Home   Help Search Login Register  

Author Topic: stay with the squad or be punished  (Read 450 times)

0 Members and 1 Guest are viewing this topic.

BronzeEagle

  • Guest
stay with the squad or be punished
« on: 27 Dec 2004, 12:31:11 »
i need a script that if the player isn't within distance to the leader during the mission he hears an audio file play saying get back with the squad soldier and after so many seconds if he's not back with the squad then it'll go to the lose outro.  

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:stay with the squad or be punished
« Reply #1 on: 27 Dec 2004, 13:01:10 »
#Loop

_counter = 5
?(player distance leader > 30): Leader Say "GetBackHere" ;goto "warning"

~0.5
goto "Loop"

#Warning

~1
?(player distance leader >30): _counter = _counter - 1; goto "Warning"
?(player distance leader <30): goto "Loop"
?(_counter<1) goto "lose"

#Lose

End the mission (ForceEnd perhaps?)
exit

That may need some modification but that should be the gist of it.



Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:stay with the squad or be punished
« Reply #2 on: 27 Dec 2004, 13:50:36 »
#checkloop
~5
?player distance (leader (group player)) > 150: (leader (group player)) groupchat format ["%1, Fall back into formation or face court marshall", name player]; goto "end"
goto "checkloop"

#end
~30
?player distance (leader (group player)) > 150: end = true; exit
goto "checkloop"
« Last Edit: 27 Dec 2004, 13:58:35 by Artak »
Not all is lost.