scoreboard messages

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post by tltrude »

First take out the end after:

thread bomb1_exploded $panel_bomb // try it this way
thread bomb2_exploded $stand_bomb // both here and below
end // remove this line


"end" makes the script stop there, so your bomb thinkers are not being turned on. Also, I think the above lines should come after the bomb thinker lines. The bomb thinker knows what your bombs are named because of this:

$panel_bomb thread global/obj_dm.scr::bomb_thinker

But, it makes an array of the bombs and uses numbers. So, it knows $panel_bomb is $bomb1. Study the "obj_team" scripts and look for lines similar to what you have "while (local.bomb1.exploded != 1)".
Tom Trude,

Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

a good point well made,

if you make it trigger->use, rather than trigger->useonce

then add to the script

//under allies
$flag_trigger remove
hope this helps, prob not cos it's all foreign 2 me :-/
solar
Colour Sergeant
Posts: 99
Joined: Fri Mar 21, 2003 2:40 pm
Location: Toledo, OH

Post by solar »

thx everyone- works like a charm now. Tom, I thought about that bomb1 and bomb2 thinking that the global system assigns them to my exploders- but it still worked anyway by doing just what you said- taking out the "end" and moving those two lines below the bomb thinker lines. Thx again.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Test

Post by tltrude »

solar - please do a test of the document trigger. First click on the trigger as an axis, then switch to allied and try to pick them up. My guess is it wont work if an axis clicks on it first. If it works, fine, but if it doesn't try the code below.

Code: Select all

//------------------------------ 
// Document thread 
//------------------------------ 

desk_document_check: 

$documents_trigger waittill trigger // waits until triggered 
local.player = parm.other 
if (local.player.dmteam == axis) 
{ 
iprintln "Axis are near the plans!" // Mistake is punished
goto desk_document_check  // Resets the thread
}
if (local.player.dmteam == allies) 
{ 
$documents playsound snd_papers 
wait .2 
$documents remove // Removes the documents
$documents_trigger remove // Removes the trigger
setcvar "g_obj_alliedtext2" "[x]Steal the Plans" 
setcvar "g_obj_axistext2" "You've lost the plans" 
level.targets_destroyed ++ // adds 1 to the number of targets destroyed 
} 

end 
Tom Trude,

Image
solar
Colour Sergeant
Posts: 99
Joined: Fri Mar 21, 2003 2:40 pm
Location: Toledo, OH

Post by solar »

Right you are Tom, it's fixed now- thx again.
Post Reply