Jump to content

Recommended Posts

Posted

Hello!

I have been trying this for hours now and wasn't able to find a solution.

My mission includes an artillery site wich fires into a city. As the GRAD lauchers take some time it is possible to kill them before they launch any rockets. (they are activated if the player is close enough so the player is able to kill them in time)

 

My problem is: How do i trigger the event which causes the player to loose score if the artillery has launched the rockets? (or the other way round, the group has been killed before they launched, doesn't matter)

:helpsmilie:

 

I hope you can help me.

[sIGPIC][/sIGPIC]

Posted

The artillery should take a very precise amount of time to prepare their attack before actually firing their weapons. When you activate the artillery, also a set any unused flag "On" (also known as true). Then create another trigger but this has a "Time Since Flag" condition with the time set to however long it takes for them to fire in seconds.

In Psuedo Code:

Once> Unit in zone> Spawn Artillery, Set Flag 1 On

Once> Time since Flag 1 is 180ish seconds> Set Flag 2 On

Once> Arty group is dead> Flag 1 Off

 

Basically you make the assumption that the artillery will reliably fire at a specific time after activation. The 3rd trigger will effectively prevent the 2nd trigger from executing if the group is killed before the 2nd trigger executes.

 

You use mission goals to affect the score.

 

Mission Goal> Flag 2 is True> Adjust points accordingly.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...