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

Creating Images

Status
Not open for further replies.
Level 9
Joined
Jun 26, 2005
Messages
511
Hi, i have another question :D, this one seems simple but i cant get it to work.

the idea is just like leaving images behind the hero (the images have to be ghost like, freeze, and disappear, after 1 second.

here is the triggers i did.

Shot at 2007-07-06

Shot at 2007-07-06
 
Level 9
Joined
Jun 26, 2005
Messages
511
lol... it worked, but that wasnt what i had in mind, instead of images their real stuff, standing blocking, their just a copy of another hero, how can i make them images? and do the animation that the casting unit is doing when it spawns? similar to the hyper speed in pudge wars if you play that.
 
Level 9
Joined
Jul 27, 2006
Messages
652
You could always open up pudgewars, its not protected but it is JASS.
To make your unit an image just make a dummy unit. However it only works if you have only one unit that your making an image of.
To make it an image, create a unit base off something like a chicken, add the locust ability, remove food requirments, disable appearance on the mini-map and all the usual things you would do to a dummy (e.g no move speed).
Then when your unit is created set its vertex animation speed to 0%.
-Hope this helps...
 
Level 27
Joined
Feb 22, 2006
Messages
3,052
Hey Kixer, good to see you again, all JASSed out... I've beeen learning some too ^_^
Anyhow, back on topic, the only problem is that it still might not get the effect he wanted, as i looks like he wants the dummy unit to be playing the same animation as the base unit and then freeze at that animation frame.
--donut3.5--
 
Level 9
Joined
Jun 26, 2005
Messages
511
hmm pudge wars advanced v1.8 is protected, and ive though of the dummy unit thing too, i would make all unit that need for the trigger if necessary, but as donut said, its nearly impossible to make unit do the animation the caster is doing.
 
Level 9
Joined
Jul 27, 2006
Messages
652
Well you could try detecting orders? I mean it will be flawed but it might work for some basic orders?
What you could do is add an if with the condition <unit> order = "<order>", and then set unit animation <dummy> <corresponding animation>.
So lets say if the order id is "move" you play the walk animation, if its "holdground" you play the "stand" animation.
The problem arouses with attacking, "smart", and spells.
When you tell a unit to "attackmove" you can play the move animation, but when you issue order "attack" you could be attacking or still moving. You could then detect if there are enemy units in a range of 100 ( for melee ) and if there are play animation "attack".
For smart orders your unit will probably be moveing or attacking most of the time so just do the same as you would with attack.
Now if your order is not equal to any of the basic ones ( move, attack, stop, patrol ) play the spell animation.
Like I said this is flawed but it might just work.
And most of the id strings in this post are wrong ( i think ).
- Hope this helps...
 
Level 9
Joined
Jun 26, 2005
Messages
511
that is wise kixer, never though of that, but i was thinking of just doing walk animations when they spawn, oh and by the way, is there a way to make unit spawn with a animation instantly?

what am doing now is create unit wait 0.1sec and do walk animation.
 
Level 9
Joined
Jul 27, 2006
Messages
652
You could hide it when you create it and then make it appear after 0.1 seconds?
Its not exactly what you wanted but it'll look better...
- Hope this helps...
 
Level 7
Joined
Jun 10, 2007
Messages
225
Also, change your events to 'A Unit Starts the Effect on an Ability'. A unis begins casting an ability starts the ability before the cooldown is started or mana cost is taken, meaning you can cast over and over again.
 
Level 9
Joined
Jul 27, 2006
Messages
652
Btw Dracula,
please use
  • tags instead of pictures. Just use the copy as text option and paste inbetween the [trigger] tags...
 
Level 9
Joined
Jul 27, 2006
Messages
652
[trigger] < Copy Trigger as Text > [/trigger]

E.G

  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Your Ability
  • Actions
  • -------- Required Variables --------
  • -------- - AntiLeak_Point --------
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • Or - Any (Conditions) are true
  • Conditions
  • (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Your Item
  • (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Your Item
  • (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to Your Item
  • (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to Your Item
  • (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to Your Item
  • (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to Your Item
  • Then - Actions
  • Set AntiLeak_Point = (Position of (Triggering unit))
  • Item - Create Your Potion at AntiLeak_Point
  • Custom script: call RemoveLocation(udg_AntiLeak_Point)
  • Hero - Give (Last created item) to (Triggering unit)
  • Custom script: set bj_forLoopAIndex = 0
  • Custom script: loop
  • Custom script: set bj_forLoopAIndex = bj_forLoopAIndex + 1
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Your Item
  • Then - Actions
  • Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
  • Skip remaining actions
  • Else - Actions
  • Custom script: endloop
  • Else - Actions
 
Level 9
Joined
Jun 26, 2005
Messages
511
  • hyper speed
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |CFF790000Hyper Speed
    • Actions
      • Set tempunit = (Triggering unit)
      • Set tempunitloc = (Position of tempunit)
      • Set temptarget = (Target unit of ability being cast)
hyper speed1
Events
Time - Every 0.10 seconds of game time
Conditions
(temptarget has buff Hyper Speed ) Equal to True
Actions
Unit - Create 1 (Unit-type of tempunit) for (Owner of tempunit) at tempunitloc facing (Facing of temptarget) degrees
Set tempunit1 = (Last created unit)
Unit - Add Locust to tempunit1
Animation - Play tempunit1's Walk animation
Unit - Hide tempunit1
Wait 0.10 seconds
Animation - Change tempunit1's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
Animation - Change tempunit1's animation speed to 0.00% of its original speed
Unit - Unhide tempunit1
Unit - Pause tempunit1
Unit - Add a 0.50 second Generic expiration timer to tempunit1

it didnt seem to work, i copy the trigger as text, am doing it all wrong?
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
  • hyper speed
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |CFF790000Hyper Speed
    • Actions
      • Set tempunit = (Triggering unit)
      • Set tempunitloc = (Position of tempunit)
      • Set temptarget = (Target unit of ability being cast)
  • hyper speed1
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
      • (temptarget has buff Hyper Speed ) Equal to True
    • Actions
      • Unit - Create 1 (Unit-type of tempunit) for (Owner of tempunit) at tempunitloc facing (Facing of temptarget) degrees
      • Set tempunit1 = (Last created unit)
      • Unit - Add Locust to tempunit1
      • Animation - Play tempunit1's Walk animation
      • Unit - Hide tempunit1
      • Wait 0.10 seconds
      • Animation - Change tempunit1's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
      • Animation - Change tempunit1's animation speed to 0.00% of its original speed
      • Unit - Unhide tempunit1
      • Unit - Pause tempunit1
      • Unit - Add a 0.50 second Generic expiration timer to tempunit1
as mentioned in the first post, initiate your trigger with the [.Trigger] tag and end your trigger with the [/trigger.] tag (without the dots). It works the same like making a line bold or in italics. If you'd like to see how it exactly works, click on "quote" on the bottom of this reply and check out on how my post was made. But don't post the quote :)
 
Status
Not open for further replies.
Top