Warcraft III resources & community, 2003–2006 · archived

Load Spell Units

5 posts
#1

Load Spell Units

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 ! )
#2
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:
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:
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--
#3
I think he wants ideas for what kind of stuff he could shoot, and not the triggers ( hes done some older triggerwork )

Hell, ill give some ideas :D

-Up to (level of ability) + 2 units loaded
-Can load workers+critters
-dont make them dumpable :D
#4
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
#5
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