Page 1 of 1
Would this work?
Posted: Sun Jun 15, 2003 7:28 pm
by Alcoholic
lets said i had a variable "level.continue = 0" after 20 seconds, it becomes "level.continue = 1". if i had a trigger that calls a thread in a script, would this line work?
self waittill level.continue == 1
???
Posted: Sun Jun 15, 2003 9:09 pm
by nuggets
main:
waittill spawn
level.your_count = 0 // this line probably not needed unless it's doing something else while false (0)
wait 20
level.your_count = 1
end
better
Posted: Mon Jun 16, 2003 1:44 am
by tltrude
try this:
self waittill (level.continue == 1)
You need to explain better what you are trying to do.
Posted: Mon Jun 16, 2003 1:50 am
by Alcoholic
i want to pass thru a trigger. the trigger sets a thread named "blah". when teh trigger is set, it WAITS until a variable is changed to 1 before executing. the variable is changed to 1 when the captain is at a specific trigger. i want to do this so that you cant just run ahead of your captain and screw up all the scripted events.
trigger
Posted: Mon Jun 16, 2003 1:57 am
by tltrude
Why not just turn the trigger off untill the captain gets there?
$mytrigger nottriggerable
$mytrigger triggerable
Also, how does your script know the captain is at the right spot? AI can't trip triggers, but you can set an origin as his destination. I'm probably not the right guy to ask about this stuff. Which singleplayer script are you using as a guide?
Posted: Mon Jun 16, 2003 2:47 am
by Alcoholic
if (level.captain istouching $trigger)
{
iprintln captain is at trigger
end
}
Posted: Mon Jun 16, 2003 2:48 am
by Alcoholic
im not using a ref script, i just got this idea because alot of people rush thru a map and mess up all the scripted sequences.
i got the istouching thing from m1l1
Posted: Mon Jun 16, 2003 6:40 am
by jv_map
The easiest way is the following:
Code: Select all
while(level.continue != 1)
waitframe
Done 8)
continue
Posted: Mon Jun 16, 2003 10:21 am
by tltrude
Use what jv_map has and put the self stuff below it. You can add this to your captain thread:
if (level.captain istouching $trigger)
{
iprintln "captain is at trigger"
level.continue = 1
end
}
That is not a very original targetname for a trigger, ha ha. In most scripts they call the captain "level.friendly1", I think.
Posted: Mon Jun 16, 2003 12:26 pm
by bdbodger
I go along with JV , simple does the trick just what you need .
Re: continue
Posted: Tue Jun 17, 2003 2:05 am
by Alcoholic
tltrude wrote:Use what jv_map has and put the self stuff below it. You can add this to your captain thread:
if (level.captain istouching $trigger)
{
iprintln "captain is at trigger"
level.continue = 1
end
}
That is not a very original targetname for a trigger, ha ha. In most scripts they call the captain "level.friendly1", I think.
in your script, you can give them an alias. i typed:
level.captain = level.friendly1
its easier for me because later i wont remember which friendly is which.