• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Dummy unit won't cast.

Status
Not open for further replies.
Level 16
Joined
Jun 24, 2009
Messages
1,409
I made a spell based on wind walk. If the hero uses it, it creates a dummy unit that will cast the Item Illusion ability on the caster but nothing happens.
Because of a system the trigger is called elsewhere not with an event and condition so don't even mention that.
  • Mirror Image
    • Events
    • Conditions
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempInt = (Player number of (Triggering player))
      • Set TempInt2 = (Dexterity[TempInt] - 20)
      • Unit - Create 1 Dummy for (Triggering player) at TempLoc facing (Facing of (Triggering unit)) degrees
      • Unit - Add Mirror Image Dummy to (Last created unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Set level of Mirror Image Dummy for (Last created unit) to TempInt2
      • Custom script: call IssueTargetOrderById(GetLastCreatedUnit() , 852274 , udg_TempUnit)
      • Custom script: call RemoveLocation (udg_TempLoc)
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
All levels of the spell are free. The temp int wont give negative value. The unit is created right at the position of the caster and as I checked with game messages, the trigger is called properly and the dummy unit is created.

AAAaaaand yes, it can cast other spells on the caster.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
The dummy tries to cast the ability on itself but it fails since it is magic immune and has locust.

Replace TempUnit with GetTriggerUnit() in the custom script where you issue the order. I think some other trigger overwrites TempUnit global or something.

Set targets allowed to friend, ground, air or something like that. I also think you were trying to set the ability level to 29, it only has 26 levels.
 

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
After this line:

  • Custom script: call IssueTargetOrderById(GetLastCreatedUnit() , 852274 , udg_TempUnit)
Add the action - Remove Ability From Unit (Mirror Image) (Dummy)

this will force the dummy to cast immediately.

Additionally, add a BJDebugMsg (Display text to all players), which says "ran" so you can verify this trigger is being properly processed by your external events.
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
On itself? But the TempUnit variable is set to the caster.

Well okay but it's impossible to overwrite it since no other triggers are running at the time.

Well, that could cause problems, I forgot to reduce it. A moment and I'll check it out.

edit: Now it creates the illusion but it dies immediately :S
 

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
Now it creates the illusion but it dies immediately :S

So the trigger is working - the illusion is created. The problem is that it dies immediately.

In the object editor, for your "wand of illusion" based spell, change the value from what it is to a larger value.

Unless you think another trigger is interfering.
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
But now the illusion dies immediately. It's HP bar won't even show up when I cast it so it's instant death. Also, it's kinda impossible to cast on other dummy unit since it's the only dummy unit called. Now I'll delete all other triggers and check what will happen.

As I expected... It still dies on cast but what's the problem? I can't find any weird value of the spell.

WHAT THE F#&@#%#
Alright I give up.... I reset the ability to be the original item illusions ability so it should work properly buuuuuuuut the illusion still dies. I tested it on a separate map with no other triggers, only the spell and illusion move trigger and the illusion still died. Is it possible that a gameplay constant or option kills it instantly?
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
  • Mirror Image
    • Events
    • Conditions
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempInt = (Player number of (Triggering player))
      • Set TempInt2 = (Dexterity[TempInt] - 20)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempLoc facing (Facing of (Triggering unit)) degrees
      • Set TempUnit2 = (Last created unit)
      • Unit - Add Mirror Image Dummy to (Last created unit)
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Custom script: call IssueTargetOrderById(GetLastCreatedUnit() , 852274 , GetTriggerUnit())
      • Custom script: call RemoveLocation (udg_TempLoc)
  • Mirror Image Move
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • ((Summoned unit) is an illusion) Equal to True
      • (Unit-type of (Summoning unit)) Equal to Dummy
    • Actions
      • Set TempLoc = (Position of (Summoning unit))
      • Set TempLoc2 = (TempLoc offset by 200.00 towards ((Facing of (Summoning unit)) + 180.00) degrees)
      • Unit - Move (Summoned unit) instantly to TempLoc, facing ((Facing of (Summoning unit)) + 180.00) degrees
      • Unit - Order (Summoned unit) to Move To TempLoc2
      • Custom script: call RemoveLocation (udg_TempLoc)
      • Custom script: call RemoveLocation (udg_TempLoc2)
      • Game - Display to (All players) the text: run
My only idea that the illusion is created faster than the dummy gets the expiration timer so the illusion gets it.
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
Dude. The problem is that the illusion spells cast on the original hero will die. If I use it on another hero, everything works. The system that calls the spells is just perfect. I also tested the spell without this system and still got this error. There must be something with the original hero that the war3 don't like.
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
What the....

Did you even read one of my latest messages?
Well, Maker sent me the map with a little "fix". He created another hero and it worked for that hero but still not for the original.
It's already fixed(partially) and I just wanted to know what was the cause of this error.
I'm blaming the engine? LOL where did you get that? I said that it's not really possible that the engine does it since I tested the spell without any other triggers....
 

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
Marsal, I have read all of your messages.

You're blaming the engine which is warcraft 3. Not some triggers. Those don't define the engine. I got that because you said repeatedly that the triggers work fine for everything as long as the base hero isn't the one you wanted.

Sounds like you don't think it's your fault to me ;)
 
Level 7
Joined
Apr 30, 2011
Messages
359
use this to check whether the dummy can cast it to the target/not:

  • Custom script: if call IssueTargetOrderById(GetLastCreatedUnit() , 852274 , udg_TempUnit) then
  • Custom script: call BJDebugMsg("Casted")
  • Custom script: endif
if that's not the prob . . .
check the duration thing . . (@object editor)
especially Duration - Hero one . . .
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
At first I was like... WHAT THE FAAAA
I've fully reset the hero and it still died. Then I reset the attribute points to default for the placed hero and it worked.... Maybe the illusion can't handle 1 str with 300 base health.

use this to check whether the dummy can cast it to the target/not:

  • Custom script: if call IssueTargetOrderById(GetLastCreatedUnit() , 852274 , udg_TempUnit) then
  • Custom script: call BJDebugMsg("Casted")
  • Custom script: endif
if that's not the prob . . .
check the duration thing . . (@object editor)
especially Duration - Hero one . . .

Read before comment.
 

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
At first I was like... WHAT THE FAAAA
I've fully reset the hero and it still died. Then I reset the attribute points to default for the placed hero and it worked.... Maybe the illusion can't handle 1 str with 300 base health.



Read before comment.

Marsal, I'm glad you figured it out!

If you would like the illusion to share a similar stat you could always trigger it after creating it, I suppose.
 
Status
Not open for further replies.
Top