i'm basically making boxes on the side of the map with "Empty slots" <small units with the scout tower's model> in them, 100 each.
What i want is that when you aquire an item, it takes an "Empty slot" from inside of the reigion corresponding to the player and to "Replace" it with an other tower with a diff model, these are to display the diff cannons you have.
This is the code, its not working
Code: Select all
Aquire Cannon
Events
Unit - A unit Acquires an item
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to Kid Cannon
Then - Actions
Unit - Add Kid Catapult to (Triggering unit) <----- this isn't working aswell, i dont know why, Btw Kid Catapult is an ability based off of phoenix fire that shoots kid progectiles, yeah. its funny! :P
Item - Remove (Item being manipulated)
Unit Group - Pick every unit in (Random 1 units from (Units owned by (Owner of (Picked unit)) matching ((Unit-type of (Picked unit)) Equal to Empty slot))) and do (Actions) <----- i figured out that the unit type comparison is the problem, any help?
Loop - Actions
Unit - Replace (Picked unit) with a Kid Cannon using The old unit's relative life and mana
Else - Actions
Custom script: set bj_wantDestroyGroup = true
Code: Select all
Init
Events
Map initialization
Conditions
Actions
Set RShip_Reigions[1] = P1Ship <gen>
Set RShip_Reigions[2] = P2Ship <gen>
Set RShip_Reigions[3] = P3Ship <gen>
Set RShip_Reigions[4] = P4Ship <gen>
Set RShip_Reigions[5] = P5Ship <gen>
Set RShip_Reigions[6] = P6Ship <gen>
Set RShip_Reigions[7] = P7Ship <gen>
Set RShip_Reigions[8] = P8Ship <gen>
Set RShip_Reigions[9] = P9Ship <gen>
Set RShip_Reigions[10] = P10Ship <gen>