Home   Help Search Login Register  

Author Topic: movement constraint in sea  (Read 1146 times)

0 Members and 1 Guest are viewing this topic.

scorpi0x

  • Guest
movement constraint in sea
« on: 22 Feb 2005, 19:02:07 »
hi, i am having a problem and i hope anyone here can help me out here.
In the start of an MPmission, i have 2 platoons on 4 boats in the sea.
How can i ensure that they cannot get out of the boat when they are in open sea (prevent them from drowning) ???

in SPmission for 1player-and-1boat situation, i have come up with a solution by setting a big trigger stretched across the sea having:
condition : !(player in boat1)
OnActivation : [] exec "constraint.sqs"

as for the contraint.sqs
its only
Quote
titleText["Come back in soldier","Plain"]
player moveInCargo boat1

#end

exit

this works fine but not in MPmission when players may not be all in the same boat.

tried modifying the trigger condition to the default "this" and constraint.sqs to:
Quote
_teamA = ["soldierA1", "soldierA2", "soldierA3"];
_teamB = ["soldierB1", "soldierB2", "soldierB3"];
?(!(player in boatA) && (player in _teamA)) : goto "moveIn_A"
?(!(player in boatB) && (player in _teamB)) : goto "moveIn_B"

#moveIn_A
titleText["Come back in soldier","Plain"]
player moveInCargo boatA
goto "end"

#moveIn_B
titleText["Come back in soldier","Plain"]
player moveInCargo boatB
goto "end"

#end
exit

apparently this can't work and i am not sure why :-\
not sure if it's the syntax as i am very new to the scripting.
or does anyone know other solution to this question?

All help is much appreciated. Thank You.


Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:movement constraint in sea
« Reply #1 on: 22 Feb 2005, 23:13:02 »
just lock the boat.

Then put a trigger near the shore so when the boat reaches the trigger the boat unlocks.
I like your approach, lets see your departure.
Download the New Flashlight Script!

scorpi0x

  • Guest
Re:movement constraint in sea
« Reply #2 on: 23 Feb 2005, 06:53:41 »
Thanks Man! :D
works great!
didn't know it can be so simple.
was wrecking my head for hours over it :P