Jump to content

Recommended Posts

Dear community.

 

I've looked in videos and post up and down, now I have to ask advice as I cannot get this to work.

 

I have an airfield with 6 helicopters with pilots named (variable name) pilot1 to pilot1_5 (by  copying the first they are assigned the _1 etc).

 

I initially started with a placing the chopper and naming the pilot. 

Placed a move waypoint, then the flightpath with move wp.

finally a transport unload wp. on an invisible helipad.

 

each pilot had their init named

pilot1_1 disableAI "MOVE" ; (corresponding pilot name)

 

trigger was named as such, with activation as "any player" in the area of the trigger.
Hint "Active" ; pilot1 enableAI "MOVE" ; 
Hint "Active" ; pilot1_1 enableAI "MOVE" ; 
Hint "Active" ; pilot1_2 enableAI "MOVE" ; 
Hint "Active" ; pilot1_3 enableAI "MOVE" ; 
Hint "Active" ; pilot1_4 enableAI "MOVE" ; 
Hint "Active" ; pilot1_5 enableAI "MOVE" ; 

 

However they don't even fire engines, no nada zip zero.

I then tried with the alive effect. 

Removed all names and init.

 

placed a survivor and named him s1 (variable name)

placed a trigger with !alive se and set waypont activation to 1st wp under heli with a string of other wp's until unload.

 

Regardless of procedure above, triggers don't fire or pilots do not get the command somehow. Anyone can see the missing dot or what I'm doing wrong?

 

Rags

 

 

Share this post


Link to post
Share on other sites

You need to do some basic troubleshooting.

 

Is your enable move trigger firing, do you see the hint message? If not, it could be something with your trigger.

 

If you see the hint, then it could be your waypoints. Remove your triggers from the waypoints, and the remove the disable move commands, and see if the pilots will move.

 

If they still won't move, delete all the waypoints, and start over. Test with only one heli, and place just one waypoint, and test. Keep adding wapypoints one at a time until you get it working.

 

The key to troubleshooting is to test only one thing at a time, until you find the problem.  

Share this post


Link to post
Share on other sites

Hi stburr91

 

Yes without the trigger, they just start and activate their waypoints and do what they are supposed to. Which is all well and good. 

I have tried with just one, but I don't know where the fault lies as it won't activate.

 

Yes the trigger fires as in i see the hint "active" when I enter the trigger area.

I have done it from scratch a few times, but the trigger firing it just won't accept.

Tried it with a soldier out of vehicle it works. So maybe I can't "hold" them back as such in helicopters?

 

Rags

Share this post


Link to post
Share on other sites

Placing units, waypoints and trigger as described seems to work (in editor, SP), so there may be something more not mentioned.

 

EnableAI and disableAI use local arguments (units).  So question becomes, does the trigger exist on the machine(s) where the pilots are local?

 

Also, might try using waypoint condition to detect the trigger true, you then might be able to do away with using enableAI/disableAI.

Share this post


Link to post
Share on other sites

opusfmspol

 

I'm afraid I don't quite follow you?

Share this post


Link to post
Share on other sites

Taking what you described, recreation works in singleplayer.  In editor:

 

- Placed a player unit.
- Placed a helo unit named: heli.
- In heli init field, put:  this disableAI "MOVE";
- (Note Using heli disableAI "MOVE" gave the same result).
- Gave heli two Move waypoints, one at heli position and another a few hundred meters away (air units complete their waypoints in a large radius).
- Placed an Any Player Present trigger in front of the player.
- In trigger OnActivation field, put:  heli enableAI "MOVE";
- Launched mission in editor (SP): The heli remained grounded, didn't fire up engines.
- Moved player into the trigger and the heli flew away.

 

So this works in singleplayer, but is your mission MP hosted or dedicated?  in that case locality may be the issue.  Which machine(s) the trigger exists on is important, because the enableAI command has to be run where the unit is local.  But I was also saying, you might do away with the disable/enable AI by using the heli's first waypoint's condition field to detect that the trigger activated:

 

- Place a player unit.
- Place a helo unit named: heli.
- Give heli two Move waypoints, one near to heli position and another a few hundred meters away.
- In the first waypoint's condition field, put:  triggerActivated trig
- Move the first waypoint to the heli position.
- Place an Any Player Present trigger in front of the player.
- In trigger Variable Name field, put:  trig
- Launch mission in editor (SP): The heli remains grounded, doesn't fire up engines.
- Move player into the trigger and the heli flies away.

 

Two ways of achieving the same result.  One uses disable/enable AI, the other doesn't.

 

But in both instances, where the trigger exists is important in multiplayer environment:
enableAIdisableAI commands have to be run where the unit is local.  The trigger doing 'enableAI' has to exist on the machine where the unit is local.
Waypoint condition only gets checked where the group is local.  The trigger getting checked for activation must exist on the machine where the group is local.

Locality can be reviewed  here.

 

Hope that's a little bit more clear.

 

In your mission, are units, waypoints and triggers all placed in editor, or are any being generated by script?

Share this post


Link to post
Share on other sites

Hi again,

 

Thank you for very thorough clarification.
I make all the waypoints and triggers in the editor and I run my machine as host for the campaign I'm running.

I'll dig a little into what you've written and get back.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×