Jump to content
Sign in to follow this  
total

Need help with changing colors on marker with trigger

Recommended Posts

I have tried for a while to create a trigger script that switches the color of the marker, but I don't know how.

Does anyone know how to do this?

- Marker turns GREEN if either Blufor or Opfor units exist within trigger zone + that there are units from independet within the trigger zone. (Hint message: Gravia is now controlled by Independet!)

- Marker turns RED if either Independent or Blufor units exist within trigger zone + that there are units from Opfor within the trigger zone. (Hint message: Gravia is now controlled by Opfor!)

- Marker turns BLUE if either Opfor or Independent units exist within trigger zone. When Blue, the marker stays BLUE even though blufor units are not present. (Hint message: Gravia is now controlled by Blufor!)

Share this post


Link to post
Share on other sites

I think setMarkerColor in the Act. field of the trigger should do the trick. You'll need the name of the marker and maybe multiple triggers per marker.

Edit: Ninja'd by Kylania.

Share this post


Link to post
Share on other sites

So it isn't possible to just use one trigger?

Share this post


Link to post
Share on other sites

Are you asking how to change colors or how to configure triggers to do what you want? :) Since you want three colors for one marker you're gonna need multiple triggers or other logic structure since each trigger is yes/no only.

Share this post


Link to post
Share on other sites

Hehe, what I'm asking for is a smart way to do what I want. I know how to change the color of a marker with one trigger, but I don't understand how to do this, when we are talking about 3 colors and 3 unit sides. As I see it, it will not work with multiple triggers alone.

So I'm hoping for some expert help here :)

Edited by Total

Share this post


Link to post
Share on other sites

Why not start the marker blue then: If OPFOR are present turn it red onAct and blue onDeact. If INDEP are present turn it green onAct and blue onDeact. If both are there it's whoever was detected last. If BLUFOR are there do nothing.

So just two triggers, easy peasy. :)

Share this post


Link to post
Share on other sites

Aha, "on deact" ... had completely forgotten that it existed, hehe. Thank you for your help!

Share this post


Link to post
Share on other sites
Why not start the marker blue then: If OPFOR are present turn it red onAct and blue onDeact. If INDEP are present turn it green onAct and blue onDeact. If both are there it's whoever was detected last. If BLUFOR are there do nothing.

So just two triggers, easy peasy. :)

This certainly wasn't as easy as the theory. :(

For example:

- A sector is under the control of Opfor with some soldiers, and the marker is Red.

- Independent attacks the sector and once they pass within the trigger zone, the marker gets Green.

- Opfor kills the Independent units and the marker gets Blue and not Red.

- Independent gets back with some new units (The marker gets Green) and kills Opfor - The marker gets Blue and not Green.

You see that this doesn't work?

How I want it to work:

If the sector is under the control of Opfor and marker is Red. The marker shouldn't get Green before Independent have killed all the Opfor units and is within the trigger zone, and vice versa. If there is no enemy soldiers within the trigger Zone, the marker gets blue.

Is there some sick way to get this to work?

Edited by Total

Share this post


Link to post
Share on other sites

I guess this is too difficult. :(

I hope Bohemia Interactive releases a form of Advanced Sector Trigger.

Share this post


Link to post
Share on other sites

There isn't a controlled/guarded/captured option in the trigger?

EDIT: No, guard is not working that way.

Anyway it should be easy, you need 3 triggers covering the area set to repeatedly with this:

Area controlled by Blufor:

Condition trigger: east countSide thislist == 0 && INDEPENDENTSIDENAMETHATIDONTKNOW countSide thislist == 0

Activation: "nameofyourmarker" setMarkerColor "ColorBlue"; hint "Gravia is now controlled by Blufor!"

Area controlled by Opfor:

Condition trigger: west countSide thislist == 0 && INDEPENDENTSIDENAMETHATIDONTKNOW countSide thislist == 0

Activation: "nameofyourmarker" setMarkerColor "ColorRed"; hint "Gravia is now controlled by Opfor!"

Area controlled by Independent:

Condition trigger: west countSide thislist == 0 && east countSide thislist == 0

Activation: "nameofyourmarker" setMarkerColor "ColorGreen"; hint "Gravia is now controlled by Independent!"

Not tested, but it should work.

The only thought that I have is on the Independent side, I think you should use Faction and not side for the Independent, but I don't know about this, wait for someone more expert.

Also, I guess it's possibile to make it works using a script and not so many trigger, but again, I don't know how to.

Inviato dal mio GT-I9300 con Tapatalk 4

Edited by Antorugby

Share this post


Link to post
Share on other sites

I don't know if it's possible to use Game Logic Activation on these two triggers, to get it to work the way I want it?

Share this post


Link to post
Share on other sites

Thanks, but I can't get the triggers to work properly . After I changed the condition so it seems that the activation doesn't work .

Although there are units from Opfor inside the trigger zone, the triggers changes the colors on the marker completely random on mission start, and when killing all the opfor units the trigger doesn't change color on marker. I need some kind of if present activation or/and condition check every 5 seconds maybe?

Edited by Total

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  

×