Trigger Giving Error

Leazy

You can change this now in User CP.
Reaction score
50
Hello, I made a trigger that is suppose to cast a spell at units on a special terrain type (in this case Lava Bricks). However, the trigger gives me error.
This is the trigger:

Code:
Take Damage On Lava
    Events
        Time - Every 0.10 seconds of game time
    Conditions
    Actions
        Set UnitGroup[1] = (Units in (Playable map area))
        Unit Group - Pick every unit in UnitGroup[1] and do (Actions)
            Loop - Actions
                Set Point[1] = (Position of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                (Terrain type at Point[1]) Equal to Dungeon - Lava Cracks
                                ((Picked unit) has buff Lava ) Equal to False
                    Then - Actions
                        Unit - Create 1 Dummy Unit for (Player((Custom value of (Picked unit)))) at Point[1] facing Default building facing degrees
                        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                        Unit - Add Damage on Lava  to (Last created unit)
                        Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy (Picked unit)
                    Else - Actions
        Custom script:   call RemoveLocation (udg_Point[1])
        Custom script:   call DestroyGroup(udg_UnitGroup[1])
 

R@i_no_Wyrm

New Member
Reaction score
43
Code:
Take Damage On Lava
    Events
        Time - Every 0.10 seconds of game time
    Conditions
    Actions
        Set UnitGroup[1] = (Units in (Playable map area))
        Unit Group - Pick every unit in UnitGroup[1] and do (Actions)
            Loop - Actions
                Set Point[1] = (Position of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                (Terrain type at Point[1]) Equal to Dungeon - Lava Cracks
                                ((Picked unit) has buff Lava ) Equal to False
                    Then - Actions
                        Unit - Create 1 Dummy Unit for (Player((Custom value of (Picked unit)))) at Point[1] facing Default building facing degrees
                        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                        Unit - Add Damage on Lava  to (Last created unit)
                        Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy (Picked unit)
                    Else - Actions
        [del]Custom script:   call RemoveLocation (udg_Point[1])[/del]<-- Put it so it loops as the picked unit loops
        Custom script:   call DestroyGroup(udg_UnitGroup[1])
Does all units in the map have custom value?
 

Leazy

You can change this now in User CP.
Reaction score
50
I added two conditions to clear it up, thanks for all the help. The trigger is now working and looking like this:

Code:
Take Damage On Lava
    Events
        Time - Every 0.10 seconds of game time
    Conditions
    Actions
        Set UnitGroup[1] = (Units in (Playable map area) matching (((Matching unit) is alive) Equal to True))
        Unit Group - Pick every unit in UnitGroup[1] and do (Actions)
            Loop - Actions
                Set Point[1] = (Position of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                (Terrain type at Point[1]) Equal to Dungeon - Lava Cracks
                                ((Picked unit) has buff Lava ) Equal to False
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Custom value of (Picked unit)) Greater than or equal to 1
                                (Custom value of (Picked unit)) Less than or equal to 12
                            Then - Actions
                                Unit - Create 1 Dummy Unit for (Player((Custom value of (Picked unit)))) at Point[1] facing Default building facing degrees
                            Else - Actions
                                Unit - Create 1 Dummy Unit for Neutral Hostile at Point[1] facing Default building facing degrees
                        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                        Unit - Add Damage on Lava  to (Last created unit)
                        Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy (Picked unit)
                    Else - Actions
                Custom script:   call RemoveLocation (udg_Point[1])
        Custom script:   call DestroyGroup(udg_UnitGroup[1])
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    nobody signs up or comments
  • The Helper The Helper:
    its crazy
  • The Helper The Helper:
    363 bots on the forum been like that for about a month this is the most bots we have ever consistently hosted
  • The Helper The Helper:
    and we are on cloud flare too right?
  • Stephen Stephen:
    Probably stupid AI garbage. It's harvesting our Nuon knowledge.
  • Stephen Stephen:
    The bots I mean.
  • The Helper The Helper:
    I suspect AI Bots as well
  • The Helper The Helper:
    Happy Saturday!!!
    +1
  • The Helper The Helper:
    I reorganized the forums somewhat but I doubt anyone would notice
  • The Helper The Helper:
    Happy Friday!
    +1
  • The Helper The Helper:
    Happy Saturday!
    +1
  • The Helper The Helper:
    The forum software says we have 554 members online now. We did not have that many unique visitors the whole day today. Too many bots and the disconnect between the forum counts and the stats.
  • Varine Varine:
    Currently it says 413 guests and 2 members
    +1
  • Varine Varine:
    Aww
  • The Helper The Helper:
    That is going to be mostly bots
  • The Helper The Helper:
    527 (members: 2, guests: 525)
  • The Helper The Helper:
    Happy Saturday!
    +1
  • V-SNES V-SNES:
    Happy Saturday!
    +1
  • The Helper The Helper:
    622 (members: 2, guests: 620)
  • The Helper The Helper:
    666 (members: 4, guests: 662) :)
    +1
  • Varine Varine:
    609 (members: 4, guests: 605)
  • The Helper The Helper:
    I was posting that last one because the 666 users online :)
    +1
  • The Helper The Helper:
    Happy Wednesday Night!
    +1
  • The Helper The Helper:
    Happy Thursday!
    +1
  • The Helper The Helper:
    Marathon watching The Expanse!

    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