OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Messiah on 25 Aug 2002, 16:39:22

Title: Whats wrong?
Post by: Messiah on 25 Aug 2002, 16:39:22
heres a script i made - just to make peeps say 'random' things...

problem is that it gets to 'Smoked me a Ruskie' and the carries on saying it....

can any1 help?

Code: [Select]
#start

? (say == 0) : goto "one"
? (say >= 0) : goto "two"
? (say >= 1) : goto "three"
? (say >= 2) : goto "four"

~0.1

goto "start"

#one

say = 1

titletext ["Wasted!", "plain down"]

goto "exit"

#two

say = 2

titletext ["Smoked me a Ruskie!", "plain down"]

goto "exit"

#three

say = 3

titletext ["What a shot!", "plain down"]

goto "exit"

#four

titletext ["Tango down!", "plain down"]

goto "lastexit"

#exit

exit

#lastexit

say = 0

exit



cheers

:thumbsup:
Title: Re:Whats wrong?
Post by: LCD on 25 Aug 2002, 17:05:19
da prob is dat it wil always get a value biger dan 0 nd wil get 2 "Smoked me a Ruskie l" sayin u need 2 change da first bit 2

Code: [Select]
#start

? (say == 0) : goto "one"
? (say >= 0 and say < 1) : goto "two"
? (say >= 1 and say < 2) : goto "three"
? (say >= 2) : goto "four"

~0.1

goto "start"

LCD OUT
Title: Re:Whats wrong?
Post by: Sefe on 26 Aug 2002, 14:10:40
Or simply turn the sequence around:

Code: [Select]
? (say >= 2) : goto "four"
? (say >= 1) : goto "three"
? (say >= 0) : goto "two"
goto "one"
Title: Re:Whats wrong?
Post by: LCD on 26 Aug 2002, 15:54:28
yeah sefe is right  ;) (do i need 2 say dat ??? sefe is always right  ;)  ;D)

:cheers:

LCD OUT
Title: Re:Whats wrong?
Post by: Tactician on 27 Aug 2002, 12:54:01
Reminds me of Duke Nukem 3D :D