Jump to content
Murix

Make AI death take sector control tickets away [multiplayer]

Recommended Posts

So I'm currently trying to make a mission like that from Ace Combat's multiplayer where each team is trying to take out the other's ground or sea assets first while in aircraft.

Currently I'm just using a sector control game mode that works fine just using modules.
What I've done is make it so dying and respawing for players doesn't take away tickets and the cap area is a tiny area in the middle of the map which players will ignore (this is a private multiplayer things so we just agree to ignore it)

Now the point of the question.
There is also a bunch of AI trucks driving around, when one of them dies I want it to take a specific number of tickets away from the side it belonged too. Therefore, destroying all of Opfor's teams AI trucks would mean they have no tickets and Blufor Would win.

Is there something I could stick in the AI trucks "Init" in the editor that would just remove a number of sector control tickets for it's side die upon death?

Share this post


Link to post
Share on other sites

Whoa, got it.

so you just slap this bad boy in the Init for the unit, this example makes it so when this unit dies it takes 5 tickets from BluFor, you can change the "west" for "east" and it'll take OpFor tickets instead.

I would however like to know how to make it give or take tickets away from the specific side the unit that killed them is from. 

this addEventHandler ["Killed",{ [west, -5] call BIS_fnc_respawnTickets; }];

Share this post


Link to post
Share on other sites

Is there also a way to get if the Vehicle is disabled(and/or destroyed) instead of destroyed?

Share this post


Link to post
Share on other sites
On 1/15/2020 at 5:21 AM, Murix said:

Is there also a way to get if the Vehicle is disabled(and/or destroyed) instead of destroyed?

canMove

https://community.bistudio.com/wiki/canMove

 

The controller checks whether the vehicle can move, so if the engine is broken, tires are flat, the track is damaged, the controller will return as true.

Then just use the command next to the vehicle name within the trigger condition.

 

canMove tank1;

 

If the tank is unable to move, the trigger will ativated.

 

* To recognize that the vehicle has returned to the condition of moving, just use the exclamation sign for the command to recognize the opposite.

 

!(canMove tank1;)

 

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

×