• 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] Need help with creating a system

Status
Not open for further replies.
Level 10
Joined
Nov 23, 2006
Messages
592
Hi, I am working on battlefield like map, and i need vehicles hijack system.
It should look like that: hero use ability to hijack vehicle -> player will control only vehicle (hero become hidden or something), and when vehicle is destroyed, move hero to place where vehicle has been destroyed with 50% hp.
After vehicle has been destroyed, create new in region xxx.

Is it possible in GUI? I'm not skilled in jass. Thx
 
Level 20
Joined
Oct 21, 2006
Messages
3,230
  • Get Tank
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
      • (Owner of (Target unit of ability being cast)) Equal to Neutral Passive
      • (Unit-type of (Target unit of ability being cast)) Equal to Siege Engine
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Casting unit)) and Change color
      • Set PlayerHero[(Player number of (Owner of (Casting unit)))] = (Casting unit)
      • Unit - Hide (Casting unit)
  • Tank Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Siege Engine
      • (Owner of (Dying unit)) Not equal to Neutral Passive
      • (Owner of (Dying unit)) Not equal to Neutral Hostile
    • Actions
      • Unit - Unhide PlayerHero[(Player number of (Owner of (Dying unit)))]
      • Unit - Move PlayerHero[(Player number of (Owner of (Dying unit)))] instantly to (Position of (Dying unit))
      • Unit - Set life of PlayerHero[(Player number of (Owner of (Dying unit)))] to 50.00%
      • Rect - Center No rect on (Position of PlayerHero[(Player number of (Owner of (Dying unit)))])
I haven't tested the trigger, but it should work.
 
Level 10
Joined
Nov 23, 2006
Messages
592
Thx, but there is one problem. The units with ability will be spawned at start of game. So i can't choose it in editor and can't make event. What to do pls?
And I am not sure about first action in tank death. Can't find [(Player number of (Dying unit)))]
Where the hell it is? Or what i must choose? thx
 
Level 10
Joined
Nov 23, 2006
Messages
592
Well. When I make event I use ''Specific units event'' cast ability blabla. But I must choose UNIT that start cast this ability. But I haven't this units placed on map so i can't choose it. Understand now? Hope ye :)
 
Status
Not open for further replies.
Top