i have a few urgent questions please

a j j bones

New Member
Reaction score
3
hi, i need to find a way to make creeps respawn, i am currently using this trigger but it is not working

Code:
respawn
    Events
        Unit - A unit Dies
    Conditions
        (Owner of (Dying unit)) Equal to Neutral Hostile
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
(Owner of (Dying unit)) Equal to Neutral Hostile

            Then - Actions
                Wait 40.00 seconds
            Else - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing (270.0) degrees


i also need to know how to make a dialog button give you an attribute bonus of one, im using this trigger and it doesnt work


Code:
level dialog
    Events
        Unit - A unit Gains a level
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Dialog - Clear mydialog
        Dialog - Change the title of mydialog to Attributes  
        Dialog - Create a dialog button for mydialog labelled + agility    
        Set dialog_button[1] = (Last created dialog Button)
        Dialog - Create a dialog button for mydialog labelled + Strength  
        Set dialog_button[2] = (Last created dialog Button)
        Dialog - Create a dialog button for mydialog labelled + Int  
        Set dialog_button[3] = (Last created dialog Button)
        Dialog - Show mydialog for (Triggering player)

and

Code:
agility button
    Events
        Dialog - A dialog button is clicked for mydialog
    Conditions
        (Clicked dialog button) Equal to dialog_button[1]
    Actions
        Hero - Set Agility of(Leveling Hero) to ((Agility of (Leveling Hero) (Exclude bonuses)) + 1), (Permanent or Temporary:Permanent)


i have no clue y it wont work
 

elmstfreddie

The Finglonger
Reaction score
203
Why do you use an If/Then/Else function? There is no need for it, and if you do have it you need and If! You have no If! In the world of math, two wrongs makes a right and meeting no requirements is impossible!
 

a j j bones

New Member
Reaction score
3
i have no if because i thought it would just use the condition on top but i guess it doesnt work that way
 

elmstfreddie

The Finglonger
Reaction score
203
No need for the If/Then/Else, your trigger should read:
Code:
Events
        Unit - A unit Dies
    Conditions
        (Owner of (Dying unit)) Equal to Neutral Hostile
    Actions
        Wait 40.00 seconds
        Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing (270.0) degrees

Edit > that's gonna leak. This won't

Code:
Events
        Unit - A unit Dies
    Conditions
        (Owner of (Dying unit)) Equal to Neutral Hostile
    Actions
        Wait 40.00 seconds
        [COLOR="Red"]Set temppoint to (Position of(Dying unit))[/COLOR]
        Unit - Create 1 (Unit-type of (Dying unit)) for [COLOR="Red"]Neutral Hostile[/COLOR] at [COLOR="Red"]temppoint[/COLOR] facing Default building facing (270.0) degrees
        [COLOR="Red"]Custom Script: Call RemoveLocation (udg_temppoint)[/COLOR]

No need to say create it for (owner of(dying unit)) because according to the condition the owner of the dying unit can only be Neutral Hostile anyways ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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