Jump to content
Sign in to follow this  
BlackbirdSD

Moving end point?

Recommended Posts

How do I randomly move an end point trigger for a multiplayer mission and have it show up on the map?  Can the trigger move with an object like getpos?  Currently I have a end trigger around a flag.  I want the trigger and flag to move randomly and have the map display the location.

Thanks

Share this post


Link to post
Share on other sites

You can move (setPos) a trigger like any object.

Share this post


Link to post
Share on other sites

How does that work?  Also how will it show up on the map?  How do you join the trigger to a physical object like a flag so the player sees it?

Thanks

Share this post


Link to post
Share on other sites

Place a small stone or small rock on the map.  Arrange it so that it always appears at a random place.

 

Trigger 1:  Walk through this trigger.  The trigger has two commands:

1 -  trigger2  setpos  getpos   rock1

2 - Coloured marker 1  setpos  getpos  rock1

 

In effect, trigger 2 will always start at a random place and a marker appears over trigger 2

.

 

Share this post


Link to post
Share on other sites

How do you want it to move "randomly?" To one of a number of specified locations? To any location within a specified area? Anywhere on the map?

 

Regardless, you'll need three things placed in the editor 

  1. A trigger - variable name "trigger_01" for this example
  2. A flag - variable name "flag_01" for this example
  3. A marker - variable name "marker_01" for this example

Place all three at your preferred starting position.

 

To move all three to a new position (however this is derived - see beginning of this reply), we do something like this:

//move trigger
trigger_01 setPos _pos;

//move flag and make upright
flag_01 setPos _pos;
flag_01 setVectorUp [0,0,1];

//move marker
"marker_01" setMarkerPos _pos;

How and where we run this code depends on how and why you want the objects to move. I assume you want this to happen at the beginning of the mission?

We are left with two questions:

  1. How "random" do you want your position to be
  2. When do you want the objects to move
  • Like 2

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  

×