Jump to content

Recommended Posts

Hello,

 

I am trying to apply special states to a vehicle with a trigger, due to the states being reset to their defaults upon the respawning of a vehicle.  Specifically, the Forbid Disembarking state from 3den Enhanced: 

 

Forbid Disembarking

Description: Crew stays in vehicle even though the vehicle is disabled.

Property: ENH_allowCrewInImmobile

DefaultValue: false

 

Is there a way to apply this state to any vehicle that enters the affected area of a trigger? 

 

I would like it to apply to any vehicle that passes through the trigger regardless of having a variable name. 

 

-OR-

 

I am also using a module from MGI Advanced Modules to allow for the vehicles to respawn with the crew members and keep their waypoints. The problem I face is seen when a member of the vehicle bails out and maintains his move, move, cycle waypoints. Then, the vehicle explodes later and respawns. Sometimes, the vehicle will respawn and will not move from its starting position since the waypoints are stuck to the crew member who left earlier. 

 

That being said, if there is a way to give orders to units that enter a trigger zone that would be a good workaround. 

 

Thanks.

Share this post


Link to post
Share on other sites
13 hours ago, SchmittyWerbenJagermanJensen said:

I am also using a module from MGI Advanced Modules to allow for the vehicles to respawn with the crew members and keep their waypoints. The problem I face is seen when a member of the vehicle bails out and maintains his move, move, cycle waypoints. Then, the vehicle explodes later and respawns. Sometimes, the vehicle will respawn and will not move from its starting position since the waypoints are stuck to the crew member who left earlier. 

 

That being said, if there is a way to give orders to units that enter a trigger zone that would be a good workaround. 

 

 

Hello, thanks for using my modules.

Roughly, if you don't want units disembark when vehicle is disabled, you need to run the allowcrewInImmobile  command for this vehicle. I didn't apply this feature by default, because I don't have to decide for mission makers.

Note: by default the module will not respawn disabled vehicles, just destroyed ones. And if you tick the respawning disabled vehicle option, that will occur once crew has disembarked.

 

Anyway, there is an undocumented variable in this module, which allows you to run a code, once the vehicle has respawned. I didn't want to add an "init field" for that, because it's not so easy to make it work properly in MP (locality, JIP potential issues).

 

If you want to forbid the crew for disembarking once a vehicle is disabled, usually you'll just write, in init field of the vehicle:

this allowCrewInImmobile TRUE; 

See alternative syntax if you want (link above).

That will work til the vehicle is destroyed, or you code the contrary.

 

Now, if you want to repeat that for the vehicle after (each) respawn, using my module, you need to:

1- give a name to the vehicle (if the vehicle is linked to the module, it's automatic), say: car1

2- write in init field of the vehicle: this allowCrewInImmobile TRUE; this setVariable ["MGICustomcode", "car1 allowCrewInImmobile TRUE" ];

Note: You can write this or car1 for the code which runs at start, but you need to use the variable name of the vehicle (car1) inside the stringed code, passed as data of the variable "MGICustomCode". This code is stringed but compiled and called after respawn, (and the vehicle keeps its variable name).

 

.

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, pierremgi said:

 

Hello, thanks for using my modules.

Roughly, if you don't want units disembark when vehicle is disabled, you need to run the allowcrewInImmobile  command for this vehicle. I didn't apply this feature by default, because I don't have to decide for mission makers.

Note: by default the module will not respawn disabled vehicles, just destroyed ones. And if you tick the respawning disabled vehicle option, that will occur once crew has disembarked.

 

Anyway, there is an undocumented variable in this module, which allows you to run a code, once the vehicle has respawned. I didn't want to add an "init field" for that, because it's not so easy to make it work properly in MP (locality, JIP potential issues).

 

If you want to forbid the crew for disembarking once a vehicle is disabled, usually you'll just write, in init field of the vehicle:

this allowCrewInImmobile TRUE; 

See alternative syntax if you want (link above).

That will work til the vehicle is destroyed, or you code the contrary.

 

Now, if you want to repeat that for the vehicle after (each) respawn, using my module, you need to:

1- give a name to the vehicle (if the vehicle is linked to the module, it's automatic), say: car1

2- write in init field of the vehicle: this allowCrewInImmobile TRUE; this setVariable ["MGICustomcode", "car1 allowCrewInImmobile TRUE" ];

Note: You can write this or car1 for the code which runs at start, but you need to use the variable name of the vehicle (car1) inside the stringed code, passed as data of the variable "MGICustomCode". This code is stringed but compiled and called after respawn, (and the vehicle keeps its variable name).

 

.

 

That did the trick, thank you very much!

 

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

×