IPB


Welcome Guest ( Log In | Register )

 Forum Rules ArmedAssault.info Forum Rules
> Totally simple 'If-Then-Else' not working!, I hate when this doesn't work!
SGJackson
post Oct 25 2010, 20:12
Post #1


Member
***

Group: Members
Posts: 131
Joined: 22-May 10
Member No.: 7,651



Hallo, it's been a long time no-seen wink.gif!

Well, I'm in a pretty beautyfull mission, every leak on it has been covered ;P

The problem is that I have a script that 'timers' the player's time to accomplish an action given... Here, this is what happens: You get to a city (Bastam - Takistan) with 2 humvees, you're the subordinate of the leading humvee, then, you're given the order to secure a Palace with your group, they all dismount (your humvee) and, technically, the player should go inside the Palace to secure it.... But before you get in, a mortar barrage falls right out of the sky... (here's the important part:) actually, if the player doesn't stay messing around, he WON'T be hit by a mortar shell, but if he's dumb enough to not read the radio message that says that you must get inside the Palace NOW! In 15 seconds of messing 'round, a mortar shell will be created on his position, killing him ¬¬

Now, my script takes place when the player DOESN'T get inside the palace in 15 seconds:

CODE
;\\The rest of your group moving inside the palace:
sol1 domove (position pos3)
sol2 domove (position pos4)
sol3 domove (position pos5)

~15
?((john distance can)<20) then {goto "Safe Player :D"} else {goto "Boom Player D:"}

#Boom Player D:
_bomb= "Sh_105_HE" createvehicle position player
exit
#Safe Player :D
john sidechat "sh*t! HQ, we've just been striked by what appear to be a mortar barrage! they've destroyed the 1st humvee and killed everyone in it, please advice, over!"
~13
[west,"hq"] sidechat "Dammit! Reaper-one, hang tight, we're gonna get you! what's your position? over."
~8
john sidechat "We're trenched inside Bastam's palace, we'll wait for you! over."
~6
[west,"hq"] sidechat "Roger, I've already sent backup, hang in there! out."
exit


What the script is telling you, knowing that the symbon ' # ' defines sections in it and that "SH_105_HE" is a defined bomb-type, in an ordinary sentence (or should tell you, 'cause obiously it doesn't work...) is:

CODE
IF the player is within a 20-meter radius from an object, THEN go to the section "Safe Player :D" or ELSE go to the section "Boom Player D:".

#Boom Player D:
Make this bomb "SH_105_HE" get created right on the player's position

Stop executing the script.

#Safe Player :D
The player says within a side-chat  "sh*t! HQ, we've just been striked by what appear to be a mortar barrage! they've destroyed the 1st humvee and killed everyone in it, please advice, over!"

Wait thirteen seconds

The HQ says to the player within side-chat "Dammit! Reaper-one, hang tight, we're gonna get you! what's your position? over."

Wait eight seconds

The player says within a side-chat  "We're trenched inside Bastam's palace, we'll wait for you! over."

Wait six seconds

The HQ says to the player within side-chat "Roger, I've already sent backup, hang in there! out."

Stop executing the script.



Please help this is driving me nuts! sad.gifsad.gif
 
Quote Post

Posts in this topic


Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 25th April 2024 - 16:47