• 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] GUI Juxtapose!?!?

Status
Not open for further replies.
Level 2
Joined
Dec 14, 2007
Messages
12
Does any1 know how to create a mirror image for attacking player 20% of time when he hits an enemy?
Image damage receive and deal aren't so important...
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Unknown
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set Integer = (Random integer number between 1 and 5)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer Equal to 5
        • Then - Actions
          • Set Point = (Position of (Attacking unit))
          • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at Point facing Default building facing degrees
          • Hero - Create Wand of Illusion and give it to (Last created unit)
          • Hero - Order (Last created unit) to use (Item carried by (Last created unit) of type Wand of Illusion) on (Attacking unit)
        • Else - Actions
 
Level 2
Joined
Dec 14, 2007
Messages
12
First off all you must remove dummy from the game and the point because it will cause lag in later game...
I have tried it earlier but images create behind attacking unit and I wat them to create at the origin of attacking unit.
 
  • Unknown
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set Integer = (Random integer number between 1 and 5)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer Equal to 5
        • Then - Actions
          • Set Point = (Position of (Attacking unit))
          • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at Point facing Default building facing degrees
          • Hero - Create Wand of Illusion and give it to (Last created unit)
          • Hero - Order (Last created unit) to use (Item carried by (Last created unit) of type Wand of Illusion) on (Attacking unit)
        • Else - Actions

This would leak a lot.
 
Level 3
Joined
Dec 17, 2007
Messages
28
I think GhostWolf's trigger could be good if he could just add remove dummy trigger and remove point custom trigger...
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I guess I was really tired when I wrote that, I almost never let my trigger examples leak :weekani:

Add a timer expiration to the dummy and remove point with
  • Custom script: call RemoveLocation(udg_Point)

And about the origin, if you want him to be there either the hero or the copy must have no collision.

You can try with turning off the hero's collision at the start of the trigger and then turn it on at the end.

Im not sure if the copy will stay there or bounce fast as hell away from the hero.
 
Level 3
Joined
Dec 17, 2007
Messages
28
Maybe it would be better to remove collision from image because that should work without bouncing image GhostWolf wrote...
 
Level 2
Joined
Dec 14, 2007
Messages
12
I don't understand image collision how to be changed... I know how to change normal units collision, but what about image collision?!?!?
 
Status
Not open for further replies.
Top