Jump to content
Jeremy James

Create Task To Move Object

Recommended Posts

Hey All,

 

I'm trying to create a task mid game so that for instance players in charge of resupply get tasked to take supplies to a certain point, when they do the task is complete.

So player activates task, simple trigger, to get an object, say, ammo box named box1 to x position (another trigger). when box1 is in x position the task is complete.

The bit I don't know is the code for an objects position within the trigger init for the trigger to recognise the object has arrived.

 

Any ideas.

Cheers and thanks in advance.

Share this post


Link to post
Share on other sites

you can place an invisible helipad or any object, name it "supply_pos", then use command distance in trigger for condition write:

( box1 distance supply_pos ) < 5

where 5 is distance ( in meters ) from supply_pos object

Share this post


Link to post
Share on other sites

But it won't be "possible" to make it work straight that way because the object will be created/spawned midgame, not at the editor.
So it will probably be necessary to add a variable name to such object and then make it public...?

 

Share this post


Link to post
Share on other sites
1 hour ago, JCataclisma said:

But it won't be "possible" to make it work straight that way because the object will be created/spawned midgame, not at the editor.
So it will probably be necessary to add a variable name to such object and then make it public...?

 

what object are you referring to ? box1 or supply_pos ? You can create them both in editor and them move supply_pos to your designated area ( mid game ) with setPos command or just move it with zeus.

  • Like 1

Share this post


Link to post
Share on other sites
12 minutes ago, M1ke_SK said:

what object are you referring to ? box1 or supply_pos ? You can create them both in editor and them move supply_pos to your designated area ( mid game ) with setPos command or just move it with zeus.


Oh, indeed! I´ve gotten so used to createVehicle [0,0,0] and attach after that  then I had completely forgotten about the idea of that.

Nice!

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

×