This seems to be the key. I have chosen my tunnel (see screen shot) and have the OBJECT ID for the North and South Entrance…
…next…OK, here is where I’m a bit lost.
I know from another of @Franze’s posts on another thread (or by now perhaps out kind administrators have moved this to that other thread) …
where the function of getLife Returns the current “life” of a unit. Also referred to as “hit points”.…if this value is less than 1 the unit is considered “dead”.
So, one should be able to write a short Lua Predicate script (Trigger condition) that checks the life of a Tunnel Entrances (using their OBJECT ID?) and returns a True Boolean if it is less that 1.
Except that’s not the way the Hoggit Wiki says to do it. They introduce something called getLife0 which is just the Unit’s initial HPs. Their example for determining the % “Life” left in a Tank
local tank = Unit.getByName(‘tank1’)
local life = tank:getLife()/tank:getLife0()
I assume the next step is to add a line:
if local life == 0.00 then return true.
Where I get lost is with “Controllers” (I keep seeing the Controller from STALKER), although I don’t think we need Controllers for this since we know the OBJECT ID…which I assume would go into the Unit.getByName(‘164593665’)?
Or do we?
