Complicated trigger - need help

Xebarsis

New Member
Reaction score
7
I apologize if I'm lacking clarity or explaining this in a confusing way, but here it goes. I'm making a spell called Molotov Cocktail; it's based on Silence. I'm basing it on silence because I want it to show the radius that the spell will be impacting. The simple description is I want it to show a missile coming to the targeted position, then once the missile contacts the position all units within a certain range will be hit by shadow strike.

This gets complicated because I don't want the units to be instantly shadow striked, I want it to happen when the missile lands on the spot. So to demonstrate the missile I created a dummy unit on the caster and on the targeted point. Then I order the first dummy unit to cast shadow strike on the second unit, which then runs another trigger to check for the shadow strike buff. If it detects the unit has the shadow strike buff, the trigger then removes the buff and creates a dummy caster for every unit in range and shadow strikes them.

Here are the problems I am encountering. When the receiving dummy caster is hit by the first shadow strike, the buff doesn't apply because the caster is invulnerable. I'm not sure how to get the buff to display at the time when the missile reaches the point.

Secondly, even if I make the dummy caster vulnerable, it only shadow strikes one unit in range when it should be shadow striking all the units in range. Here are my two triggers:

Code:
Molotov Cocktail
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Molotov Cocktail (Item)
    Actions
        Game - Display to (All players) the text: Moo
        Set ThePoint = (Target point of ability being cast)
        Set TheOtherPoint = (Position of (Triggering unit))
        Unit - Create 1 Dummy Killer for (Owner of (Triggering unit)) at ThePoint facing Default building facing degrees
        Set Drunkard = (Last created unit)
        Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
        Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at TheOtherPoint facing Default building facing degrees
        Set Bartender = (Last created unit)
        Unit - Add Molotov Cocktail (Graphic) to (Last created unit)
        Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
        Unit - Order Bartender to Night Elf Warden - Shadow Strike Drunkard
        Custom script:   call RemoveLocation (udg_ThePoint)
        Custom script:   call RemoveLocation (udg_TheOtherPoint)

Code:
MC Receiver
    Events
        Time - Every 0.05 seconds of game time
    Conditions
    Actions
        Set MolotovGroup = (Units in (Entire map) matching (((Matching unit) has buff Molotov Cocktail Starter ) Equal to True))
        Unit Group - Pick every unit in MolotovGroup and do (Actions)
            Loop - Actions
                Game - Display to (All players) the text: SOMEONE SHOULD BE B...
                Unit - Remove Molotov Cocktail Starter  buff from (Picked unit)
                Set TheOtherPoint = (Position of (Picked unit))
                Set MolotovVictims = (Units within 512.00 of TheOtherPoint)
                Unit Group - Pick every unit in MolotovVictims and do (Actions)
                    Loop - Actions
                        Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
                        Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                        Unit - Add Molotov Cocktail  to (Last created unit)
                        Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
                        Custom script:   call RemoveLocation (udg_TheOtherPoint)
        Custom script:   call DestroyGroup (udg_MolotovGroup)
        Custom script:   call DestroyGroup (udg_MolotovVictims)

Again, sorry that this is so confusing. Let me know if you have any questions.
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Custom script: call RemoveLocation (udg_TheOtherPoint)

Is not placed right, put it outside the loop.
 

Builder Bob

Live free or don't
Reaction score
249
To get around the invulnerable problem, make the dummy for a neutral player that won't get targeted automatically, and give it high hp and hp regen.
 

Xebarsis

New Member
Reaction score
7
Hey, doing what you both said actually made the spell work! :eek:

Excellent, the spell works as intended now. However, I've ran into a third problem. My game is based on kills, but I don't know how to make the game know what player used Molotov Cocktail (Item). I want to make it so that if a player uses Molotov Cocktail (Item), then the dummy caster that is created to shadow strike all units in the MolotovVictims group will be owned by the player that used the item so that the kills are registered properly. Any ideas?
 

Xebarsis

New Member
Reaction score
7
Happy Halloween! (BUMP!)

All I need is help on figuring out how to make the dummy caster that spawns for neutral extra that shadow strikes all enemies to spawn for the player who originally used the item, then I can put this thread to rest.

Code:
                        Unit - Create 1 Dummy Caster for [U][B](Owner of (The-Dude-Who-Casted-Molotov Cocktail (Item)))[/B][/U] at TheOtherPoint facing Default building facing degrees
                        Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                        Unit - Add Molotov Cocktail  to (Last created unit)
                        Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
                        Custom script:   call RemoveLocation (udg_TheOtherPoint)
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
i dont think your custom script is used correctly and
first
did you give him the spell
is the spell based off of shadow strike
does it cost mana
does the unit tend to attack other units
does the skill have any requirements
and is the range long enough
 

Xebarsis

New Member
Reaction score
7
i dont think your custom script is used correctly and
first
did you give him the spell
is the spell based off of shadow strike
does it cost mana
does the unit tend to attack other units
does the skill have any requirements
and is the range long enough

Eh? The entire spell is working fine. All I need to do is set it so that the dummy caster is given to the player who used Molotov Cocktail (item) instead of neutral extra. Unfortunately I don't know how to do that because the spell is started via a buff and I don't know how to make the game detect what player added the buff onto the unit. If anyone knows how I can accomplish this, please let me know.
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
use the event
unit-finishes casting ability
 

Malkier

New Member
Reaction score
2
correct me if I'm wrong here but all you're after now is "how do i make dummy units owned by the player".

add this to the molotov cocktail trigger
Set Molotovchucker = (Triggering Unit)

and put this into the MC reciever trigger
Unit - Create 1 Dummy Caster for (Owner of (Molotov Chucker) at TheOtherPoint facing Default building facing degrees

so it should make them whatever player used the item ^_^

EDIT: 'change' the action in the MC reciever trigger to "Unit - Create 1 Dummy Caster for (Owner of (Molotov Chucker) at TheOtherPoint facing Default building facing degrees", not put in another action = /
 

Xebarsis

New Member
Reaction score
7
correct me if I'm wrong here but all you're after now is "how do i make dummy units owned by the player".

add this to the molotov cocktail trigger
Set Molotovchucker = (Triggering Unit)

and put this into the MC reciever trigger
Unit - Create 1 Dummy Caster for (Owner of (Molotov Chucker) at TheOtherPoint facing Default building facing degrees

so it should make them whatever player used the item ^_^

EDIT: 'change' the action in the MC reciever trigger to "Unit - Create 1 Dummy Caster for (Owner of (Molotov Chucker) at TheOtherPoint facing Default building facing degrees", not put in another action = /

Thank you, that's just what I needed. :D
 
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