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. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. Units have been turned into heroes in our latest Icon Contest! Vote for the best icon set at the Icon Contest #18 Poll!
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. 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.

Need Help - Bossfight Lich

Discussion in 'World Editor Help Zone' started by Paulus, Jan 18, 2014.

  1. Paulus

    Paulus

    Joined:
    Jan 17, 2014
    Messages:
    155
    Resources:
    0
    Resources:
    0
    I'm making a RPG map, in one of the rooms there is a bossfight with a Lich. I want to make the fight interactive. So i made a trigger that lich will frost nova near the goodguys, so they have to move or be hit by the frost nova.

    In picture 1, you see a wisp. This is an invisible unit.
    With a trigger, the wisp instantly moves to an enemy unit, then an exclamation marc is created, then after 1,5 sec the exclamation marc is removed and lich uses frost nova on the wisp.
    The problem is, that sometimes the wisp jumps to a units location, and sometimes it just sits there and does nothing. What i experienced was that when i dont move my hero, there is a great chance the wisp also does not jump.
    (I have made 2 forces, player 1,2,3,4&5 in 1 force, and player 9 (grey)in the other. So allies of player 5 are the 4 players. I did this so i have a some units that can give quests)

    Can someone explain why sometimes the unit jumps and why not everytime. Is there a better way to use this (like dummies or stuff)

    ps. If you have suggestions for a nice fight with lich, plz submit them or pm me about your idea.
     

    Attached Files:

  2. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,611
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    1. post triggers edit: nvm second pic
    2. make the lich fire stuff in random directions so you have to dodge it
     
  3. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,308
    Resources:
    0
    Resources:
    0
    I assume the wisp is allied with player 5? So it would sometimes move to it's own position.
    Also, your trigger is leaking, should fix that too :)
     
  4. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,532
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
  5. Solu9

    Solu9

    Joined:
    Jan 25, 2011
    Messages:
    2,166
    Resources:
    47
    Models:
    26
    Icons:
    16
    Skins:
    1
    Tools:
    1
    Maps:
    3
    Resources:
    47
    (Random player from (all allies of Player 5 (Yellow)))

    Make it:
    Unit - Move (Wisp) instantly to (Position of (Random unit from (Units in (Playable map area) matching (((Matching unit) belongs to an enemy of (Owner of (Lich))) Equal to True))))
     
  6. Paulus

    Paulus

    Joined:
    Jan 17, 2014
    Messages:
    155
    Resources:
    0
    Resources:
    0
    Thx for the quick replies

    @Chaosy: that is a good one,thx

    @LordDz: No, the wisp is actually player 9(grey). I did this so the unit was visble for Lich. I adepted the frost nova so it could target also own units.

    @deathismyfriend: Will use that, thx

    @solu9: Thx, it works like a gem now.
    I have a question. When i start the map with the hero already in the region. The trigger does not seem to find him. If i teleport in the region with a way gate he is found directly and if he does not move, he is frosted.
     
  7. Nichilus

    Nichilus

    Joined:
    Sep 26, 2009
    Messages:
    1,968
    Resources:
    0
    Resources:
    0
    I think Fugees would agree with your choice for wisp's name :D

    Also, don't use actions like that:
    - Create special effect
    - wait 1.5
    - destroy last created effect

    Because by that time it may not be last created effect.
     
  8. Paulus

    Paulus

    Joined:
    Jan 17, 2014
    Messages:
    155
    Resources:
    0
    Resources:
    0
    You're right. Often i had those exclamation marcs stays forever. Any tips to get around this?
     
  9. Solu9

    Solu9

    Joined:
    Jan 25, 2011
    Messages:
    2,166
    Resources:
    47
    Models:
    26
    Icons:
    16
    Skins:
    1
    Tools:
    1
    Maps:
    3
    Resources:
    47
    Not sure. Perhaps another trigger interferes in some way.

    Also as Nichilus said.
    Don't use waits if you can avoid it.
    What he says is that you create an effect and then waits for 1.5 second. But in those 1.5 seconds a new effect could be created in another trigger.
    If so, then the "last created effect" is no longer the exclamation mark. See?

    If you insists on using the wait, then store the exclamation mark effect in a special effect variable.

    The action will look something like this:
    Create a special effect at point of Wisp using exclamation mark
    Set FrostNovaTarget = last created effect
    wait 1.5 seconds
    Destroy FrostNovaTarget
    Issue Lich to Frost Nova Wisp

    A better way to do a simple trigger like this is:
    Set the cast time of the Frost Nova to 1.5 seconds

    Trigger 1:
    Create a special effect at point of Wisp using exclamation mark
    Set FrostNovaTarget = last created effect
    Issue Lich to Frost Nova Wisp

    Trigger 2:
    Events - A unit starts the effect of an ability
    Conditions - Ability being cast = Frost Nova
    Actions -
    Destroy FrostNovaTarget

    Edit:
    The cast time on Frost Nova can be difficult to get to work. If you have set the owner of the Lich in Player Properties to something, then the Lich probably won't cast the Frost Nova at all because of the cast time. (Blame stupid AI).

    In that case use a start a timer instead:
    Trigger 1:
    Create a special effect at point of Wisp using exclamation mark
    Set FrostNovaTarget = last created effect
    Start FrostNovaTimer as a one shot timer that will expire in 1.5 seconds.

    Trigger 2:
    Events - A timer expires
    Conditions - Timer expiring equal to FrostNovaTimer
    Actions -
    Destroy FrostNovaTarget
    Issue Lich to Frost Nova Wisp (this time with a 0 second cast time)
     
  10. Melth

    Melth

    Joined:
    Jul 8, 2013
    Messages:
    193
    Resources:
    2
    Maps:
    2
    Resources:
    2
    When I create a special effect I immediately set a special effect variable to be the last created special effect. Then you can destroy the variable at your leisure.

    The only thing to be careful about is that that variable doesn't get reassigned to be some other special effect in the meantime. To avoid that, simply make as many special effect variables as you need and assign them carefully.