| 09-06-2003, 01:34 AM | #1 |
i am trying to make an ability based upon cannibalize which allows units to eat corpses and gain mana from them instead of HP. I checked in the spell editor and there was no data field for it. Does anyone know how to do this through triggering? |
| 09-11-2003, 03:41 AM | #2 |
This is just a pseudo code This would take 4 variable and 5 triggers Real variable = cannibalizeManaLevel = 0 Unit variable = cannibalizeManaCaster = noUnit boolean variable = cannibalizeing = false cannibalizeManaLevel cannibalizeMana cannibalizeManaON cannibalizeManaMoveTest cannibalizeManaAttackTest cannibalizeManaLevel (this trigger must be in JASS in order for the condition to check the correct learned spell) Event - Hero learns a skill Condition - learned skill equal to (<your spell's 4 letter code here {ex. A001}>) Actions - set cannibalizeManaLevel = cannibalizeManaLevel + 1 cannibalizeMana Event - A unit is issued an order with no target. Condition - (issued order) equal to (<the cannabalize order>) Actions - if(cannibalizing equal to false) TurnON(cannibalizeManaON) else textmessage - "You are already cannibalizing a unit" cannibalizing = true wait (<however long you want it to last>) turnOFF(cannibalizeManaON) cannibalizing = false cannibalizeManaON Event - every 5.5 - cannibalizeManaLevel Actions - set mana of cannibalizeManaCaster = mana of cannibalizeManaCaster + 5 X cannibalizeManaLevel cannibalizeManaMoveTest Event - A unit is issued an order targeting a point Condition - ordered unit equal to cannibalizeManaCaster cannibalizing = true Actions - turnOFF(cannibalizeManaON) set cannibalizing = false cannibalizeManaAttackTest Event - A unit is issued an order targeting an object Condition - ordered unit equal to cannibalizeManaCaster cannibalizing = true Actions - turnOFF(cannibalizeManaON) set cannibalizing = false (unless it is a hero spell with levels you don't need the levels variable or trigger. Is this too jumbled?) |
| 09-11-2003, 07:28 PM | #3 |
the ability is going to be a normal unit ability. It will be enabled for all the heroes of my AoS Style map(there are 16 heroes) but it is going to need an upgrade to be researched. I understand how to do the upgrade stuff but what i am wondering is how many more variables would i need for 16 heroes? Could i just do an array? Also, how do i convert the trigger into JASS? |
