Jump to content
Sign in to follow this  
panicsferd

Make a movable trigger? A trigger that moves with a unit that is in motion?

Recommended Posts

I am not sure how to word this correctly, but I on a mission I am working on I have it where the player is in a aircraft and is tasked with destroying a convoy and I would want to have it where when the player strikes first, or is spotted by the convoy... the convoy would say call in an aircraft to help defend them.

 

I would call this aircraft in via a trigger, but because the convoy is on the move it is hard to use a trigger, so I am wondering if there is a way to make a trigger that moves along with a target so I can maybe easily have it be where when the convoy sees the player in his aircraft it will then trigger and then trigger the aircraft reinforcements?

 

Or will I have to do some other type scripting to get the results that I want?

Share this post


Link to post
Share on other sites

Not sure if you can't just simply use AttachTo to keep the trigger on the convoy... in worst case you can write a loop that moves the trigger with the convoy, e.g.

while { true } do {
 trigger1 setPos (getPos convoy1);
 sleep 1;
};

 

Something like that.

 

There's plenty of other scripted solutions as well, though.

  • Like 1

Share this post


Link to post
Share on other sites

Or this one maybe as a condition:

 

nameofplayer distance nameofconvoy > 500;

 

Since if the player comes close the convoy should by all means see him.

Share this post


Link to post
Share on other sites

If it is sufficient that you only do the triggering from a single vehicle that belongs to the convoy then:

  • create a trigger and enter a Variable Name, for this example we use airSupportTrigger
  • select one of the vehicles in the convoy and enter a Variable Name for that vehicle, for this example we use convoyVehicle

Then in the convoyVehicle's Init field type:

airSupportTrigger attachTo [convoyVehicle,[0,0,0]];

 

Now when the mission begins the trigger will be attached to the vehicle and will move "with" the vehicle anywhere it happens to drive.

  • Like 1

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  

×