• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Units spawned by spell.

Status
Not open for further replies.
Level 12
Joined
Dec 13, 2008
Messages
1,048
Ok, so I want a trigger where when a hero casts a spell (owned by a specific player), units/heroes will spawn in a different place. This is what I have so far, but it doesn't seem to work:
  • Ragnaros Dark Iron Dwarves
    • Events
      • Unit - A unit owned by Player 8 (Pink) Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Black Iron Dwarves and Ragnaros
    • Actions
      • Wait 1.00 seconds
      • Unit - Remove (Triggering unit) from the game
      • Wait 1.00 seconds
      • Unit - Create 1 Majordomo Executus for Player 8 (Pink) at (Center of Majordomo Executus <gen>) facing 90.00 degrees
Also, I want it where if someone has cast this spell before you have, then this whole trigger wont occur. I do not know how to do this.

Anyone who can help me with this will get +rep and my thanks!! :thumbs_up:
 
That spell should work, although the Remove unit may not work because you have waits.

If you want to only allow the spell to be cast once you can simply do Trigger - Turn Off (This Trigger). If you wanted to be perfect and remove the spell itself, there is some JASS code I could give you.
 
Change the remove triggering unit with casting unit and remove the waits.

also add this before the turn off trigger
JASS:
Custom script: call RemoveLocation(udg_Majordomo Executus)

This fixes any leaks that would occur. Also to remove the trigger just use this and add it to the end of your trigger

  • Actions
    • Trigger - Turn off (This Trigger)
 
  • << Your Trigger >>
    • Events
      • Unit - A unit owned by Player 8 (Pink) Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Unit - Remove (Casting unit) from the game
      • Wait 1.00 seconds
      • Unit - Create 1 Majordomo Executus for Player 8 (Pink) at (Center of Majordomo Executus <gen>) facing 90.00 degrees
 
ok, so i changed some things but it still isnt working. this is what i have.

  • Ragnaros Dark Iron Dwarves
    • Events
      • Unit - A unit owned by Player 8 (Pink) Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Black Iron Dwarves and Ragnaros
    • Actions
      • Game - Display to (All players) the text: The Iron Dwarves an...
      • Unit - Create 1 Majordomo Executus for Player 8 (Pink) at (Center of Majordomo Executus <gen>) facing 90.00 degrees
      • Unit - Remove (Casting unit) from the game
      • Trigger - Turn off Ragnaros Dark Iron Dwarves <gen>
I am having a hero cast the spell, could this be the problem? Does it have to be a UNIT, or is a unit and hero the same thing in World Editor?
 
a player is casting it and no, the message does not appear. nothing works on the trigger. the hero does not dissapear (the one that is casting the spell), no hero appears in the region, nor does the message appear.
 
Ok.....it still isnt working!!! This is what I have:

  • Ragnaros Dark Iron Dwarves
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 8 (Pink)
      • (Ability being cast) Equal to Black Iron Dwarves and Ragnaros
    • Actions
      • Game - Display to (All players) the text: The Iron Dwarves an...
      • Unit - Create 1 Majordomo Executus for Player 8 (Pink) at (Center of Majordomo Executus <gen>) facing 90.00 degrees
      • Unit - Remove (Casting unit) from the game
      • Trigger - Turn off Ragnaros Dark Iron Dwarves <gen>
Is there another way I can do this? Like can I do something similar to this by a building or something? cuz basically i want something where the players need to choose which race they wanna be, and when they choose that then certain heroes and units spawn at a certain point. And obviously this isnt working at the moment.
 
Replace Player 8 (Pink) with Owner of (Triggering Unit) so that option is accessible to all players - Do the same thing with action create 1 Majo...

Also Casting unit fails for me, best thing to use is (Triggering Unit) So replace (Casting Unit) with (Triggering Unit).

Also don't forget about leaks.
 
Try this:

Ragnaros Dark Iron Dwarves
Events
Unit - A unit begins casting an ability
Conditions
(Owner of (Casting unit)) Equal to Player 8 (Pink)
(Ability being cast) Equal to Black Iron Dwarves and Ragnaros
Actions
Game - Display to (All players) the text: The Iron Dwarves an...
Unit - Create 1 Majordomo Executus for Player 8 (Pink) at (Center of Majordomo Executus <gen>) facing 90.00 degrees
Unit - Remove (Casting unit) from the game
Trigger - Turn off this trigger
 
Jesus christ....it still isnt working:
  • Ragnaros Dark Iron Dwarves
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Black Iron Dwarves and Ragnaros
    • Actions
      • Game - Display to (All players) the text: The Iron Dwarves an...
      • Unit - Create 1 Majordomo Executus for (Triggering player) at (Center of Majordomo Executus <gen>) facing 90.00 degrees
      • Unit - Remove (Triggering unit) from the game
      • Trigger - Turn off Ragnaros Dark Iron Dwarves <gen>
WHY?!?! :cry:

The condition
  • (Ability being cast) Equal to Black Iron Dwarves and Ragnaros
is all one thing. The spell is called Black Iron Dwarves and Ragnaros
 
Nothing is working or only a part?
Does the casting unit disappear, or the new unit or the text appear?

Ah, and erase the underlined part:
Conditions
And - All (Conditions) are true
Conditions

(Ability being cast) Equal to Black Iron Dwarves and Ragnaros

And replace this: Unit - Remove (Triggering unit) from the game
for this: Unit - Remove (Casting unit) from the game

And put first the action that removes the caster and then the one that creates the new unit.

If nothing continues to work, try by replacing all things by variables.
If truly nothing continues to work, your last hope is to do it with JASS, but it's a very simple spell, it must work with GUI...
Can be that something makes the spell impossible to cast?
 
None of the trigger is working. No unit is spawned, no unit is removed, nor does a message appear, even after the changes that were suggested by many people:

  • Ragnaros Dark Iron Dwarves
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Black Iron Dwarves and Ragnaros
    • Actions
      • Game - Display to (All players) the text: The Iron Dwarves an...
      • Unit - Create 1 Majordomo Executus for (Triggering player) at (Center of Majordomo Executus <gen>) facing 90.00 degrees
      • Unit - Remove (Casting unit) from the game
      • Trigger - Turn off Ragnaros Dark Iron Dwarves <gen>
Is there an alternative to what I am trying to achieve?
 
Try to make a new canvas map and only make the spell trigger, the two units and the region, it MUST work.

If it work in a new map, means that something in the other is blocking it, if it don't work in the new map can be a problem of your editor.

Anyway if it don't works in a new map I'll try to do it for you.
 
Trigger solutions posted before works, "And" is fully unnecessary.
Begins casting an ability fails sometimes best thing to do is Unit starts the effect of ability.

And I said Casting unit is useless, BEST thing is (Triggering Unit) unless trigger contains multiple casters.

As I said all of those solutions works, It's NOT problem in trigger, it's problem in your spell or something, trigger is good.

Also What type of spell you use for that Dark Iron and Ragnaros? I prefer slam/warstomp/thunderclap for such spells.
 
i was using berserk cuz i read somewhere about using self-buff abilities for stuff like this but ill try to use a different ability. i will let you know how it goes.
 
Status
Not open for further replies.
Back
Top