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])
 
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:
    Happy Sunday!
    +1
  • The Helper The Helper:
    I will be out of town until Sunday evening
    +1
  • The Helper The Helper:
    I am back! Did you miss me LOL
    +1
  • jonas jonas:
    where did you go?
  • The Helper The Helper:
    Jefferson TX on a Paranormal Investigation of a haunted bed and breakfast - I got some friends that are paranormal investigators and they have an RV and do YouTubes
    +1
  • The Helper The Helper:
    It was a lot of fun. The RV was bad ass
  • jonas jonas:
    That sounds like fun!
    +1
  • The Helper The Helper:
    it was a blast!
  • The Helper The Helper:
    I am going to post the Youtube of the investigation in the forums when it is ready
    +1
  • jonas jonas:
    cool!
  • vypur85 vypur85:
    Sounds cool TH.
  • tom_mai78101 tom_mai78101:
    I was on a Legend of Zelda marathon...
  • tom_mai78101 tom_mai78101:
    Am still doing it now
    +1
  • jonas jonas:
    which one(s) are you playing?
  • jonas jonas:
    I played a little bit of the switch title two weeks ago and found it quite boring
  • The Helper The Helper:
    just got back from San Antonio this weekend had the best Buffalo Chicken Cheesesteak sandwhich in Universal City, TX - place was called Yous Guys freaking awesome! Hope everyone had a fantastic weekend!
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • The Helper The Helper:
    We have been getting crazy numbers reported by the forum of people online the bots are going crazy on us I think it is AI training bots going at it at least that is what it looks like to me.
  • The Helper The Helper:
    Most legit traffic is tracked on multiple Analytics and we have Cloud Flare setup to block a ton of stuff but still there is large amount of bots that seem to escape detection and show up in the user list of the forum. I have been watching this bullshit for a year and still cannot figure it out it is drving me crazy lol.
    +1
  • Ghan Ghan:
    Beep boop
    +1
  • The Helper The Helper:
    hears robot sounds while 250 bots are on the forum lol
  • The Helper The Helper:
    Happy Saturday!
    +1
  • The Helper The Helper:
    and then it was Thursday...
    +2

    The Helper Discord

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top