Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Multiple Ability Bug Help

Discussion in 'Triggers & Scripts' started by Aoen, Oct 31, 2006.

  1. Aoen

    Aoen

    Joined:
    Apr 27, 2006
    Messages:
    186
    Resources:
    0
    Resources:
    0
    For my map which will hopefuly soon be released I have some abilities that aren't working.

    Rabies - Basically it shadowstrikes an enemy unit, but instead of decreasing attack + move speeds the get decreased, and if the rabied unit dies for the duration of the spell, rabies transfers onto another nearby unit (not nessecarily an enemy unit, can be a hero). For some reason the transfering part doesnt work. Here is my trigger:

    Rabies
    Events
    Unit - A unit Finishes casting an ability
    Conditions
    Or - Any (Conditions) are true
    Conditions
    (Ability being cast) Equal to Rabies
    (Ability being cast) Equal to Rabies Relapse
    Actions
    Set RabiedUnit = (Target unit of ability being cast)
    Set NextUnitToBeRabied = (Random unit from (Units within 900.00 of (Position of (Target unit of ability being cast)) matching ((Unit-type of (Matching unit)) Not equal to Carrier Hawk)))
    Unit - Create 1 Rabies Caster for Player 5 (Yellow) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
    Set RabiesCaster = (Last created unit)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Unit-type of (Triggering unit)) Equal to Volva
    Then - Actions
    Unit - Set level of Rabies Relapse for RabiesCaster to (Level of Rabies for (Triggering unit))
    Else - Actions
    Unit - Set level of Rabies Relapse for RabiesCaster to (Level of Rabies Relapse for (Triggering unit))

    The "Rabies Relapse" is the same ability, rabies, but remade into a unit ability so that the "rabies casters" can use it. There is another simple trigger as well. Could it possible be the order string?
    Rabies Unit Dies
    Events
    Unit - A unit Dies
    Conditions
    (Dying unit) Equal to RabiedUnit
    Actions
    Unit - Order RabiesCaster to Night Elf Warden - Shadow Strike NextUnitToBeRabied


    ------------------------------------------------------

    Missile Launcher - Basically barrage remade into a multishot type ability, most of you are probably familiar with it, but for some reason, it fires whenver my hero attacks, rather than the specified time I set it, and it targets infinite units (that are nearby) instead of the 5 it is supposed to hit. What did I do wrong?

    Rabies Unit Dies
    Events
    Unit - A unit Dies
    Conditions
    (Dying unit) Equal to RabiedUnit
    Actions
    Unit - Order RabiesCaster to Night Elf Warden - Shadow Strike NextUnitToBeRabied

    ------------------------------------------------------


    How do you make a repair that doesn't use lumber (even if the player's lumber is 0 lol...)


    ------------------------------------------------------

    Reply to any of these plz! thx in advance for any help :p.
     
  2. Shamanruler

    Shamanruler

    Joined:
    Mar 29, 2004
    Messages:
    224
    Resources:
    1
    Maps:
    1
    Resources:
    1
    isnt this just the move acid bomb?
     
  3. Aoen

    Aoen

    Joined:
    Apr 27, 2006
    Messages:
    186
    Resources:
    0
    Resources:
    0
    I'm afraid you're going to have to be more specific, and if you mean rabies, no they are nothing alike in any aspect xcept DPS and both include a targeted unit.
     
  4. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Repair w/o lumber - set the Repair Lumber Cost to 0. ( on the unit )

    Missle Launcher - im pretty sure barrage will only target infinite units, but try also making sure your UNIT's Maximum Number of Targets is the same as that of the barrage

    and of course it goes on attack - thats what barrage does :?
     
  5. Aoen

    Aoen

    Joined:
    Apr 27, 2006
    Messages:
    186
    Resources:
    0
    Resources:
    0
    For repair i set the powerbuild cost, the power build rate, and the bpowerbuild ratio to 0 but i don't see any lumber cost but it still doesn't work, and how do u make a mutli shot ability like the one in dota, do you have to use dummies? Or is there a simpler way because I don't feel like over-complicating the ability.
     
  6. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    26,131
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Thats probably the flaw since your creating the trigger before the var is set so it actualy is saying.
    You have to create the event for each rabied unit not for a variable.

    Well im not sure completly. . .
    I specilize in jass not GUI and you will find a spell is alot easier to make in jass than in GUI.
     
  7. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    What most people dont seem to understand is...

    When you USE a variable in a programming language, that usage will not update when you update the variable. The current value of the variable (AT THAT TIME) is used to supply your data (hence why GUI, as far as i know, doesnt support using variables in events - since those events are initialized before a GUI user could possibly set a global variable, your just saying Null Dies ( No Unit Dies, in GUI Terms )

    Basically, if a variable is a bucket, and the usage is your mouth...

    If you dump an empty bucket into your mouth, youll still be thirsty :lol:

    If you dump a full bucket into your mouth, youll get a mouthful.

    If you refill the bucket with Orange Juice, the water you just drank doesnt turn to Orange Juice. When you drank it, it was water

    -----------------------------------------

    hope this clears things up a bit.
     
  8. Aoen

    Aoen

    Joined:
    Apr 27, 2006
    Messages:
    186
    Resources:
    0
    Resources:
    0
    I think I already know wat ur trying to say, that a variable is.. well a variable, it changes. But what you said is very confusing and I don't see how that's supposed to help fix any of my bugs.
     
  9. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Its explaining further on what super said, to show why your rabies trigger isnt working
     
  10. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    26,131
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    You can not use a variable unit in GUI for events created in the event section.

    You have to add the event to the trigger after the variable is set.

    Want to know more?
    Learn JASS
     
  11. Aoen

    Aoen

    Joined:
    Apr 27, 2006
    Messages:
    186
    Resources:
    0
    Resources:
    0
    K, i'm not a noob at GUI but I dunno if u come from another country or i;m just being stupid, but can one of you just alter my trigger to make it work and repost it?
     
  12. Kixer

    Kixer

    Joined:
    Jul 27, 2006
    Messages:
    737
    Resources:
    0
    Resources:
    0
    seen it before

    just so u know iv dl a similar spell fron this site.
    it was exactly what you said but it did damage...
    the create says it was bug less so you might want to cheak it out..
    i cant remember the name exactly so ur gonna have to search for it....
     
  13. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    It wouldve been JASS, seeing as GUI is kinda screwey and leaky when you try to do this kind of thing
     
  14. Aoen

    Aoen

    Joined:
    Apr 27, 2006
    Messages:
    186
    Resources:
    0
    Resources:
    0
    There's got to be a way with making this in GUI...
     
  15. Aoen

    Aoen

    Joined:
    Apr 27, 2006
    Messages:
    186
    Resources:
    0
    Resources:
    0
    There's got to be a way with making this in GUI... What if you do a wait for condition - target is dead or something, or can u at least show me the exact part in my trigger that isn't working?
     
  16. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Super already did...

    RabiesUnit Dies

    is equal to

    No Unit Dies ( aka null dies )

    Why do you think we were explaining about vars and how they work?

    Want to learn more? learn JASS, as super already said. Theres some things that GUI just sucks at, and this is one of them - making triggers on-call
     
  17. Aoen

    Aoen

    Joined:
    Apr 27, 2006
    Messages:
    186
    Resources:
    0
    Resources:
    0
    Alright then what if I add in right after:

    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Unit-type of (Triggering unit)) Equal to Human Hound Dog
    Then - Actions
    Unit - Set level of Rabies Relapse for RabiesCaster to (Level of Rabies for (Triggering unit))
    Else - Actions
    Unit - Set level of Rabies Relapse for RabiesCaster to (Level of Rabies Relapse for (Triggering unit))


    And I'll add in :
    Wait for condition checking every 2 seconds Rabied Unit is Dead equal to true

    And I'll just delete the "Rabies Unit Dies" trigger

    Wouldn't this work (although it might lag the game a bit if the rabies Damage over Time wears off and the rabied unit doesn't die)?
     
  18. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Should work.

    Just make sure you also end it if the unit no longer has the buff.
     
  19. Aoen

    Aoen

    Joined:
    Apr 27, 2006
    Messages:
    186
    Resources:
    0
    Resources:
    0
    Alright thanks i'll try that.