Home   Help Search Login Register  

Author Topic: How to cancel moveInCargo?  (Read 3059 times)

0 Members and 1 Guest are viewing this topic.

Offline Nirrum

  • Members
  • *
How to cancel moveInCargo?
« on: 26 Jun 2009, 01:28:47 »
Well I'm back! After six years or so (I think) from originally creating missions from OFP I have decided to have a go at reclaiming my youth and taking a stab at ARMA2 editing.  :good:

However, my scripting has more rust than polish these days and I have a question I hope someone can answer for me.

I have created a 5 man squad called sol1,sol2,sol3,sol4 & sol5.  The mission starts with a boat insertion being driven by an AI unit called, boat.  In my ini.sqs I have typed;

sol1 moveInCargo [boat, 0];
sol2 moveInCargo [boat, 2];
sol3 moveInCargo [boat, 3];
sol4 moveInCargo [boat, 1];
sol5 moveInCargo [boat, 4];

Which works fine, however,  as each unit is playable during the mission if I swap to another player Sol1 will order the squad to return to the boat.

I have considered deleting the boat after the insertion, to avoid this problem, but it still forms part of the mission as a back up extraction point if the helicopter is destroyed.

So is there anyway to cancel this moveInCargo order after insertion, or perhaps there is a more sophisticated script in existance which bypasses this problem?

I have tried assignAsCargo command but this doesnt seem to work as my team spawns in the sea and die  >:(

By the way in case your intrested my OFP missions were 'Widows Ridge' and 'The Big Push' which both scored 8/10 in the mission depot many many moons ago.!!


Offline Sparticus76

  • Members
  • *
Re: How to cancel moveInCargo?
« Reply #1 on: 26 Jun 2009, 03:18:04 »
1. Create a trigger that activates only once on the boat being present inside it and place it over the boats initial position in the editor.
2. In the triggers on activation line put {_x moveInCargo boat} forEach units group sol1

Has been tested and works. And because it's only triggered off at the start, it wont come back to bite u in the butt later on.

Offline Nirrum

  • Members
  • *
Re: How to cancel moveInCargo?
« Reply #2 on: 26 Jun 2009, 18:38:44 »
Thanks for reply Sparticus, however my problem remains the same even with

 '{_x moveInCargo boat} forEach units group sol1' 

Perhaps I have setup the trigger wrongly? 

It is activated by presence of BLUFOR which is the boat. I have set type to  'switch' and condition as 'this'.

Should there be a command in the On deactivation line to cancel the On Activation command?



Offline Sparticus76

  • Members
  • *
Re: How to cancel moveInCargo?
« Reply #3 on: 27 Jun 2009, 03:14:41 »
oops, forgot to mention, group the trigger to the boat, and make it a normal trigger, not a switch.

trigger size 20x20
place it over the boat
group it to the boat
edit the trigger again and it should have vehicle in the Activation window
go down and click on present
type none
condition this
on activation {_x moveInCargo boat} forEach units group sol1

done..give that a try mate.

Offline CharlieReddog

  • Members
  • *
Re: How to cancel moveInCargo?
« Reply #4 on: 27 Jun 2009, 19:37:38 »
How are you getting your chaps out of the boat when it gets to it's destination? I think that's the crux of the problem, not how you put them in.

Offline Nirrum

  • Members
  • *
Re: How to cancel moveInCargo?
« Reply #5 on: 27 Jun 2009, 23:17:27 »
Still no joy i'm afraid,

Sol1 really likes that damned boat!  :confused:

At the insertion waypoint I have typed in the activation field;

commandGetOut [sol1,Sol2,Sol3,Sol4,Sol5,Sol6] 

to disembark the squad which works fine. Is this the problem then Charlie?

Offline Sparticus76

  • Members
  • *
Re: How to cancel moveInCargo?
« Reply #6 on: 28 Jun 2009, 02:21:49 »
Try unassign vehicle for everyone after the getout command.