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

Load Spell Units

Status
Not open for further replies.
Level 4
Joined
Jul 3, 2005
Messages
100
Okay , im making a very cool multi-instanceable Paesant Cannon ( =P ) , and i wish to know :

-: The amount of Paesants loaded .
-: The type of unit loaded .
-: Remove an Unit from the Load .

All this is for a " Paesant Ammo " style , wich you can load paesants , and then shoot em' !

http://dl3.ohshare.com/v/3397108/PaesantGUn.w3x.html
You can download the map ^ HERE ^ !

Sry for ghramar <(T.T<)

Thank you , i will give credit !

( no strange WE mods plizz ! )
 
Level 27
Joined
Feb 22, 2006
Messages
3,052
This requires a few triggers.
First, your cannon needs a spell like Orc Burrow's Load, and it can load only peasants.
Then you need a spell based off of either Storm Bolt or Shockwave, depending on what kind of damage you want. Change them to how you find it fitting, then change the Art - Missle to either the peasant model, or, since the meatwagon missle is a peasant, that. Make it cost 1 mana.
Here are your two trigs:
Code:
Events - Every .05 seconds
Conditions
Actions
Set AntiLeakUnitGroup = Units of type CannonUnit

Pick every unit in AntiLeakUnitGroup and do actions
Unit - Set mana of (Picked unit) to (Real((Number of units in (Units owned by (Owner of (Picked unit)) matching (((Matching unit) is loaded into (Picked unit)) Equal to True)))))

Custom Script: call DestroyGroup (udg_AntiLeakUnitGroup)
Trig 2:
Code:
Actions
A Unit begins casting an ability
Conditions
Ability is equal to CannonFireAbility
Actions
Kill Unit - (Random unit from (Units owned by Player 1 (Red) matching (((Triggering unit) is loaded into (Last created unit)) Equal to True)))

That should do what you want ;)
--donut3.5--
 
Level 4
Joined
Jul 3, 2005
Messages
100
thanks purplepoot 4 ideas ( wich are veery cool ! ) ,
Thank donut 4 the triggers , but i am using a dummy spell , because using paesant as a missile doesn't look good .
Also the trigger shouldnt be like that :

Actions
A Unit begins casting an ability
Conditions
Ability is equal to CannonFireAbility
Actions
Kill Unit - (Random unit from (Units owned by Player 1 (Red) matching (((Triggering unit) is loaded into (Last created unit)) Equal to True)))


but :

Actions
A Unit begins casting an ability
Conditions
Ability is equal to CannonFireAbility
Actions
If/Then/Else =Conditions:
(Units owned by (Owner of (casting unit) loaded into (casting unit ) is more than (0)
Then:
Kill Unit - (Random unit from (Units owned by Player 1 (Red) matching (((Triggering unit) is loaded into (Last created unit)) Equal to True)))
Else:
Game - display to ( owner of (casting unit) : (Got no ammo !)


:evil:

Thanks donut 4 teh idea
 
Level 4
Joined
Jul 3, 2005
Messages
100
thanks purplepoot 4 ideas ( wich are veery cool ! ) ,
Thank donut 4 the triggers , but i am using a dummy spell , because using paesant as a missile doesn't look good .
Also the trigger shouldnt be like that :

Actions
A Unit begins casting an ability
Conditions
Ability is equal to CannonFireAbility
Actions
Kill Unit - (Random unit from (Units owned by Player 1 (Red) matching (((Triggering unit) is loaded into (Last created unit)) Equal to True)))


but :

Actions
A Unit begins casting an ability
Conditions
Ability is equal to CannonFireAbility
Actions
If/Then/Else =Conditions:
(Units owned by (Owner of (casting unit) loaded into (casting unit ) is more than (0)
Then:
Kill Unit - (Random unit from (Units owned by Player 1 (Red) matching (((Triggering unit) is loaded into (Last created unit)) Equal to True)))
Else:
Game - display to ( owner of (casting unit) : (Got no ammo !)


:evil:

Thanks donut 4 teh idea
 
Status
Not open for further replies.
Top