Jump to content
Sign in to follow this  
Αplion

Markers question - please help

Recommended Posts

Hi all,

I'm making a map having 3 markers on 3 pre-defined areas. These markers should be not visible on the map unless one of the players get into a trigger area (pre-defined also). At that time I need only one of these above mentioned markers, to be randomly appeared on the map (visible to all players).

Can anyone help me on that ?

Thanks

Share this post


Link to post
Share on other sites

fairly easy. Place your markers as 'empty' marker, with the colour you want them to be, then name them marker1 marker 2 and marker3

Set up your trigger and make it activate the following sqs script:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

? !(local server) : exit

_randomnumber = abs (random 3)

?_randomnumber = 1 : "marker1" setmarkertype "markertype"; exit

?_randomnumber = 2 : "marker2" setmarkertype "markertype"; exit

"marker3" setmarkertype "markertype"

exit

check the BIS wiki for available types of markers.

Share this post


Link to post
Share on other sites

Thanks for your help anyway Messiah but so far this script gives me the 3rd marker all the time. crazy_o.gif

Aplion

Share this post


Link to post
Share on other sites

As Spooner from OFPEC gave me the solution I'm writting it here for anyone reference.

Quote[/b] ]Well, I'll give you the easy way:

* SP or COOP only, since all players will see the marker when it appears.

* Will not show the marker to anyone who joins the game after the second objective is revealed. However, they will still get the trigger placed in the right position.

You already have a trigger set up for objective one, which is the one you want to reveal objective two. Add the following trigger code to it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(Objective 1 trigger On Act)if (isServer) then { "objective2" setMarkerPos (getPos ([ob2a, ob2b, ob2c] select (floor (random 3)))); "objective2" setMarkerType "Attack"; objective2Trigger setPos (getMarkerPos "objective2"); };

Create a new trigger for the second objective and place it far out to sea, so the players can't get to it before it is revealed. Name it "objective2Trigger". Set this up as you normally would, other than its initial position.

Create a marker called "objective2" which is of type "Empty" (There are actually two markers called "Empty", for reasons best known to BIS. Choose the one that is a square with two chevrons, rather than the one that is a circle). This will not initially be visible in the mission.

Add 3 gamelogics, one each at the possible location of the second objective (named ob2a, ob2b and ob2c).

Aplion

Share this post


Link to post
Share on other sites

odd... it 'shouldn't' do, but this is ArmA after - good to know you got it solved anyway.

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  

×