Jump to content

destroying human weapons and planes with the :destroy() function


Recommended Posts

Posted

Hi all !

 

I'm writing a script called Sanctuary; with this, a mission maker can define a zone (center+radius, or mist polygon) in which the players from a coalition are protected from the human players from other coalitions (some sort of safe zone).

 

In this script, whenever a human lingers too long in the zone, I try and remove him from the game by using :destroy() on his unit.

Also, when a human player fires a missile at another human in the zone, I try and :destroy() the weapon, too.

 

This works very well for AI planes and their weapons, but not at all with humans in MP.

 

Did any of you ever try to do this ?

Could maybe our friend @BIGNEWY ping our beloved devs, and ask about this behavior ?

It's one of the multiple instances where the API does not work in the same way in SP and MP.

 

Thank you for reading, I hope someone will help me !

veafSanctuary.lua veaf-demo-mission_20210410-AI.miz veaf-demo-mission_20210410-MP.miz

  • Like 1

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

Posted

Thanks, you're always helpful and that means a lot to the community !

  • Like 1

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

Posted

I found a way : using `trigger.action.explosion` it is possible to destroy weapons and planes, human or not !

https://youtu.be/4ZY7SC3MOHI

  • Like 1

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

  • Recently Browsing   0 members

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