1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Spell] Recognizing a Locust-type unit for a Fireball spell

Discussion in 'World Editor Help Zone' started by Setokaiva, Jul 10, 2016.

Tags:
  1. Setokaiva

    Setokaiva

    Joined:
    Sep 15, 2011
    Messages:
    48
    Resources:
    0
    Resources:
    0
    Hello. I've got an issue with GUI triggering I hope you fine fellows can help me out with.

    See, I'm trying to create an explosive Fireball spell using a dummy unit, with said dummy being Locust-type (so it is not selectable or targetable ingame), and then have it so this unit "moves to the point of casting" when "Fireball" is cast. Thing is, I got that far, but now... nothing. No trigger I make seems to stick with this; I tried using a "kill unit" trigger to make the Fireball 'explode', but it didn't properly pick the dummy unit. Tried "Kaboom!" from the Goblin Sapper, and even though it 'killed' the Fireball, further triggers did not recognize that the Kaboom! ability was used or that the Fireball was dead. Tried having it build a structure and then killing the structure it builds, and not even that worked.

    What am I doing wrong, here? Is this because the Fireball is a Locust-type unit? What do I need to do to make sure it 'dies' at the end of its movement order, or does something that I can link to further triggers? How would you create such a spell?

    I'll answer any questions you guys may have. Please help. Thanks.
     
  2. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,936
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    Can you post the triggers instead? So we can see if you make any mistake.
    It has nothing to do with the Fireball dummy being a Locust-Type unit as far as I know.
     
  3. DaDDyWitch

    DaDDyWitch

    Joined:
    Sep 13, 2013
    Messages:
    143
    Resources:
    0
    Resources:
    0
    I recommend you to use a damage detection system instead if your spell targets units directly.
    and posting triggers would make it easier for us to help you :)
     
  4. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,255
    Resources:
    16
    Tools:
    2
    Maps:
    2
    Spells:
    7
    Tutorials:
    4
    JASS:
    1
    Resources:
    16
    You could precalculate the Time your Fireball needs to move and use the add expiration timer to the fireball-Unit. Then you make a Trigger with a fireball-Death Event dealing the damage, plays Explosion Effect and removes the fireball.

    or just use a missile System Which just does all that hard work for ya.
     
  5. Setokaiva

    Setokaiva

    Joined:
    Sep 15, 2011
    Messages:
    48
    Resources:
    0
    Resources:
    0
    Right, sorry about that. Here's the one that deals with trying to order the Fireball to move and then die. It moved fine, but when it came time to dying, it just didn't do it, which prevented the second trigger path from working, but I put it up anyway.
    [​IMG]
    [​IMG]
     
  6. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,936
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    Judging from your trigger, it is both inefficient and leaking.

    As some posts above said, I also suggest that you should use DDS or missile system. They are far more efficient and leakless.
    They can also help you to achieve your goal though it might be a bit complicated.

    I have previously made a spell that works similar to what you're trying to make. Not sure if it is the same as you wanted but here it goes.
     
  7. Setokaiva

    Setokaiva

    Joined:
    Sep 15, 2011
    Messages:
    48
    Resources:
    0
    Resources:
    0
    Thanks, but, um... I don't know how to properly use or view in detail an imported trigger in World Editor. What do?

    And how exactly is my trigger 'inefficient and leaking'? What can I improve? Do you see what I'm doing wrong that might stop this from working properly?

    Also, what kind of 'missile system'? The only one I've found used vJASS. Is that the one you meant?
     
    Last edited: Jul 10, 2016
  8. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,936
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    Open the map you've downloaded with world editor then press Ctrl + F9 button to test it in-game.
    Look at the trigger editor to view in detail the triggers it has. Copy the folder and paste it into your map (Make sure the "Automatically Create Unknown Variables" is checked). Learn from the imported trigger.

    You are leaking locations "Position of Blabla"
    it should be stored into a variable first then use it then destroy it later so it won't leak.
    UnitGroup - Pick every unit [...] is also leaking. It should also be stored into a variable and destroyed later.
    You're using wait, wait isn't accurate. It isn't that noticeable, though.

    Try to look for one in the spell submission section, BPower's missile system is a pretty good one.
     
  9. Setokaiva

    Setokaiva

    Joined:
    Sep 15, 2011
    Messages:
    48
    Resources:
    0
    Resources:
    0
    Thanks, Rheiko! Your Magic Bolt spell is working perfectly. ^^ I just need to tweak some variables to make it scale with ability level, but that framework was already in place, so it's no biggie.
     
  10. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,936
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    Glad it can be useful. :)