• 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.

[Trigger] Small Variable Problem. Easy huh?

Status
Not open for further replies.
Level 25
Joined
May 11, 2007
Messages
4,650
I guess this should be here, cause it's a spell triggering problem.

The thing is:

Copy Cat is a dummy spell based of mana burn with 0 in mana burned.

  • Events
    • Unit - A unit owned by Player 1 (Red) Finishes casting an ability
  • Conditions
    • (Ability being cast) Equal to Copy Cat
  • Actions
    • Set CopyCatunit = (Target unit of ability being cast)
    • Game - Display to (All players) the text: (Name of (Target Unit of ability being cast))
    • Wait 2 seconds
    • Game - Display to (All players) the text: (Name of CopyCatUnit)
My problem over here is that it doesn't show the name of the unit. It doesn't seem like it saves the unit in the Set variable.
 
Last edited by a moderator:
Level 3
Joined
May 4, 2007
Messages
66
I dont think u can use "Target unit of ability being cast" with "Unit - Finishes casting an ability". Try using some other event like "Unit - A unit Starts the effect of an ability" that should work.

Why not just use ''(Name of (Target Unit of ability being cast))'' there aswell ?
Because after two seconds "Target unit of ability being cast" will be lost and he have to store it to variable.
 
Level 3
Joined
May 4, 2007
Messages
66
I think (Target unit of ability being cast) is one of the few that does not lose its reference.
Maybe this will be my next experiment. Check which of them holds/loses the unit after a wait.

But if some other spell is cast while wait is on won't that change (Target unit of ability being cast) to another unit?
 
Level 11
Joined
Jul 12, 2005
Messages
764
As i wrote, i started the experiment. I got an interesting result so far. I tried the most important unit variables like triggering/ordered/casting/dying/etc.. (nearly 10 of them)
The fact is, ONLY (Target unit of ability being cast) lost its reference. So Nosferatu, i admit, you were right.
I'm gonna test more if i'll have time.
 
Level 25
Joined
May 11, 2007
Messages
4,650
Thanks for the help! I'll check that out, cause as the mana burn is INSTA-cast, it can't be canceled before cast? :grin:


And the last trigger, it was just to check if it worked to show the name of the casting unit - it didn't work :bored:

So, if yer doing the experiment please tell me when you are done.
 
Status
Not open for further replies.
Top