• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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