OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: shadow99 on 24 Jul 2004, 03:21:55
-
How do I ask for a condition in a script? In my exit.sqs file I basically want to ask 'not alive dude', and if so, go to outro1.
If he is alive, I want exit.sqs to go to outro2. How is this achieved?
-
?NOT ALIVE dude or ?not alive dude or ?alive dude
But why do this from the exit.sqs?
Make the ending triggers different. Make one with the condition, this and ?not alive dude
and make it end2
and another with just
this and ?alive dude
and goto end1
Actually I confused myself here....
Not sure but that way is kinda half asked.... and probably won't work. :-\ :-\ :P
-
exit.sqs
#check
?(!alive dude) : ACTIVATE OUTRO 1; exit
ACTIVATE OUTRO 2
exit
And replace "ACTIVATE OUTRO 1" and "ACTIVATE OUTRO 2" with something to activate the correct outro.
EDIT
Damn ou GRK, you beat me to it >:( :) And by 3 minutes :P
-
Never mind what I said then, that's better and mine is crap right now. ::) :P
EDIT:
me=speed + no quality
you = no speed +quality
Now who wins if OFP scripting here? You. ;D
-
Thanks to both of you. You may have helped more than you think, Roach. I also just wanted to know how to have a condition in a script in general.
And thanks for the code j-man. Exactly what I wanted. :)
-
Hang on... does Outro 1 and 2 activate depending on End#1 and End#2?
eg: If I make a trigger with type: End#1, does that mean the outro that activates will be Outro 1?
If not, then how do I activate an outro of my choice?
-
well what i would do is make a trigger and in its condidtion put
!alive unitname
replace unitname with the soldiers name
then in that triggers activation filed put somthing like
soldier1dead=true
Now I Dont Know If Outro is a scipt that your onabout or the end trigger so..
if its a trigger then...
now to your exit scipt
simple line
?soldier1dead=true: end1=true
now for your end trigger
on the end triggers condidtion filed put
end1
but if thats all your exit.sqs file dose then delete it and just put in the end triggers condidtion put
soldier1dead
Otherwise if outro is a script then
in your exit.sqs scipt
simple line
?soldier1dead=true: [] exec "outro.sqs"
Hope This Helps
Cheers, Philly
-
Sorry to tell you after putting all that wokr in Philly, but no. You see, this 'soldier1' whom is in my case 'officer1', is your squad leader.
There are two ways of completing the mission, one with him dead and one with him alive.
If he is alive at the end of the mission, I want the game to go to 'Outro2'.
If he is dead, I want the game to go to 'Outro1'.
For the most part, I know how to do that. It's just ACTIVATING the actual correct Outro I have trouble doing.
Thanks anyway, man.
-
ok in the officers init or a init.sqs file put
officer1alive=0
now make a trigger and it its condition put
!alive officer1and in its activation put
officer1alive=1
now in your exit.sqs file put
?officer1alive==1:goto "outro2"
?officer1alive==0:goto "outro1"
-
Thank you!