Jump to content
Sign in to follow this  
eViLsTieFel

Trigger seems to render unit senseless

Recommended Posts

Hey everybody! I'm working on a mission that involves checkpoints... it's a multiplayer mission. So far, everything went okay. There seems to be a problem with a trigger though:

I'm creating a car, a civilian and an independent unit. On initialisation, the civilian gets in as driver, the indep is assignedAsCargo and gets orderGetIn true. Both units comply and move into the vehicle.

After that, the civilian gets a waypoint to drive down the road towards the checkpoint and stop there. He does so, while the independent guy sits right next to him, not doing anything like he is supposed to.

Now, I created a trigger, which does the following:

car1trig = createTrigger ["EmptyDetector", [100,100,0]];
car1trig setTriggerArea [5, 5, 0, False];
car1trig setTriggerText "car1 reached Destination";
car1trig setTriggerTimeout [5, 5, 5, False];
car1trig setTriggerType "NONE";
car1trig setTriggerActivation ["WEST", "PRESENT", false];
car1trig setTriggerStatements ["(car1 distance (position car1 nearestobject 'SoldierWB')) < 5", "{_x setbehaviour 'Normal'; unassignvehicle _x} foreach crew car1", ""];

So, when I or any other BLUFOR Soldier approaches the car on foot, both driver and insurgent disembark, which they do!

But now the odd part... the insurgent does not seem to correctly target any blufor soldiers, instead, he just fires his weapon constantly into the air while bending his back so that he looks upwards. During this time, everytime he shoots, gameplay gets very choppy and the game stops for some milliseconds.

If I use RTE and do the exact same steps, only manually as a codeline, this does NOT happen and the insurgent kills people like he is supposed to. Obviously, the trigger does something to the game mechanics I do not quite understand...

Anybody know what the problem is? Thanks!

Share this post


Link to post
Share on other sites

Have you tried setting a destroy waypoint on the player unit to force him to attack you, other than that I can't think of anything.

Share this post


Link to post
Share on other sites

It's not that he does not try to attack me, but there must be something weird happening to the unit when the trigger accesses it. It DOES fire because it detects my presence. Only it fires up in the sky and somehow drains massively on game performance. Either it's some sort of bug or something about local and global variables is going on that I don't understand :|.

Share this post


Link to post
Share on other sites

Well yes, I'm using more than just one. But still, this wouldn't explain why this only happens when using a trigger, and works when doing it manually. Or would it?

Edit: I can confirm it also does not work when just using vanilla arma without any mods (well, except for RTE).

Edited by eViLsTieFel

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  

×