Jump to content

Set damage on unit


TheTrooper

Recommended Posts

Hi all. In the mission editor, is there a way to set damage to a unit? In particular set the damage to an oil tanker (Tanker Elnya 160) so it's smoking?

 

Can this only be done with a scrtipt and if so where would I put it?

-----------------------------------------------

Intel® Core™i7 Quad Core Processor i7-6700 (3.4GHz) 8MB Cache | 32GB HyperX FURY DDR4 2133MHz | MSI GeForce RTX 2070 ARMOR 8G |SSD 1TB 970 EVO Plus M.2

Link to comment
Share on other sites

That's fine. How would I go about doijng that?

-----------------------------------------------

Intel® Core™i7 Quad Core Processor i7-6700 (3.4GHz) 8MB Cache | 32GB HyperX FURY DDR4 2133MHz | MSI GeForce RTX 2070 ARMOR 8G |SSD 1TB 970 EVO Plus M.2

Link to comment
Share on other sites

The following script will generate an explosion on the designated unit (required field marked in red, don't remove the quotation marks):

 

 

local Explosion_Location = Unit.getByName("UNIT name of the ship in ME"):getPoint()

 

if Explosion_Location ~= nil then

 

trigger.action.explosion(Explosion_Location, 120) -- 120 is the minimum explosion power required to get the Elnya tanker smoking. Keep in mind that it'll stop smoking 9 minutes after the explosion

 

end

 

 

I'm assuming you aren't using a static Elnya tanker, btw. Let me know if you are.


Edited by Hardcard
Link to comment
Share on other sites

Yeah I am using the Elnya tanker

-----------------------------------------------

Intel® Core™i7 Quad Core Processor i7-6700 (3.4GHz) 8MB Cache | 32GB HyperX FURY DDR4 2133MHz | MSI GeForce RTX 2070 ARMOR 8G |SSD 1TB 970 EVO Plus M.2

Link to comment
Share on other sites

Currently they're not the static ones. Standard ones. I'll go with which ever is the easiest though to achieve what I'm after.

-----------------------------------------------

Intel® Core™i7 Quad Core Processor i7-6700 (3.4GHz) 8MB Cache | 32GB HyperX FURY DDR4 2133MHz | MSI GeForce RTX 2070 ARMOR 8G |SSD 1TB 970 EVO Plus M.2

Link to comment
Share on other sites

  • Recently Browsing   0 members

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