Lava Surge Trigger - How to make units take damage when entering lava?

Indenzity

New Member
Reaction score
0
[SOLVED] Lava Surge Trigger - How to make units take damage when entering lava?

Hello,

I have been watching tutorials and been reading a lot on how to make it so that if any unit on the map enters the lava (which consists of two regions I made), it dies.

The only problem I have is this: I can't get it to work..
I have especially followed this guide: http://www.sc2mapster.com/forums/re...gger-terrain-make-lava-water-raise-and-lower/

Code:
Kill Units in Lava Trigger

This trigger will kill any unit that stays in the lava when it is risen. 
Create a Trigger named 'Kill units in Lava' with a Periodic Event for the event.

Events
Timer - Every 0.5 seconds of Game Time
Local Variables
Conditions
Lava Death? == true
Actions
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any 
Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Picked unit) uses Fly mover) == false]
((Picked unit) uses FlyLow (Unnamed) mover) == false
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
(Ground height at (Position of (Picked unit))) <= 10.5
Then
Unit - Add 1 Lava Damage to (Picked unit) from player 15 Add behavior to unit.
Else
Else

I managed to reach the "General - If (Conditions) then do (Actions) else do (Actions)", but I can't find the "((Picked unit) uses Fly mover) == false]
((Picked unit) uses FlyLow (Unnamed) mover) == false
" or the "(Ground height at (Position of (Picked unit))) <= 10.5" as well as the " Unit - Add 1 Lava Damage to (Picked unit) from player 15 Add behavior to unit."

Could anyone please help me with this problem? I have been struggling with this problem for 3 hours now.. I'am so frustrated.

Thanks!
 

Dave312

Censored for your safe viewing
Reaction score
269
Both the ((Picked unit) uses Fly mover) == false and the ((Picked unit) uses FlyLow (Unnamed) mover) == false conditions use the Unit Uses Mover function.

The (Ground height at (Position of (Picked unit))) <= 10.5 condition uses the Height At Point function where the point is the position of the picked unit.

Hope that helps.
 

Indenzity

New Member
Reaction score
0
Hmm, okey. But when I try to enter the "New Function" at Data -> New -> New Function, it is greyed out, I can't click it. What do I do?

I have only used this editor for 2 days now, so sorry if it was a really dumb question..

But thanks for reply, I appreciate it! :)
 

Dave312

Censored for your safe viewing
Reaction score
269
That "New Function" thing is for creating a custom function which you do not want to do. Click where you want to place your condition (on the If under the If Then Else action) and then click on New Condition from the toolbar (shortcut is Ctrl+K). You want to use a comparison which should already be highlighted so just click ok. Now from the window at the bottom, you can edit the values for the comparison. Double click on Value 1 and it should open up a window with a list of function to choose from. You need to use the functions I mentioned is my previous post. From there just fill in the rest of the values to duplicate the condition you are copying.
 

Indenzity

New Member
Reaction score
0
I'am almost there :)

However, my triggers are slightly different, and does not work, so I will show you how mine looks like.

General - If (Conditions) then do (Actions) else do (Actions)
*If
-(Height of Region1) <= 10.5
-(Height of Region2) <= 10.5
*Then
Unit - Add 1000 Lava Damage to (Picked unit) from (Picked unit)

As you can see, I didn't manage to find the: (Ground height at (Position of (Picked unit))) <= 10.5

And I couldn't find any player as well (on the unit action)

Sorry for late reply, but I was sleeping :p
 

Dave312

Censored for your safe viewing
Reaction score
269
Just to confirm, the lava is only on a portion of your map (Region1 and Region2)? If so, you don't need to check the height of the region, rather when you pick every unit in the game, you should only be picking units that are in Region1 and Region2.

As you can see, I didn't manage to find the: (Ground height at (Position of (Picked unit))) <= 10.5
Type Height At Point into the find field when you select the function to use for your condition. It should come up. Then all you need to do is change the Unit property to Picked Unit.
 

Indenzity

New Member
Reaction score
0
It worked! It worked! :)

Thank you so much for your help, I really appreciate it. If you were in this room right now, I would have hugged you :p

That lava thing was really confusing, but also the most difficult trigger at the map.

Thank you so much again :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top