Page 2 of 2

Posted: Fri May 16, 2003 7:47 pm
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)".

Posted: Fri May 16, 2003 9:38 pm
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

Posted: Sat May 17, 2003 2:01 am
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.

Test

Posted: Sat May 17, 2003 4:30 am
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 

Posted: Sat May 17, 2003 6:37 pm
by solar
Right you are Tom, it's fixed now- thx again.