mOoEyThEcOw
New Member
- Reaction score
- 3
Soo what I want to do is try to make it so that whenever a unit uses a specific item, it upgrades, subtracting resources... soo heres what i have so far, the ability 'upgrade' which im using as the event is based off of avatar with a duration .01, im manipulating the item with a unit, that has a hero inventory, might that be problem?
Problem is either the game crashes, or nothing happens....
Code:
Main ItemUpgrade
Events
Unit - A unit Uses an item
Conditions
Actions
Set Point_Temp = (Position of (Hero manipulating item))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to Expansive Strength [Level 1]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Hero manipulating item)) Current lumber) Greater than or equal to 50
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Item - Remove (Item being manipulated)
Item - Create Expansive Strength [Level 2] at Point_Temp
Hero - Give (Last created item) to (Hero manipulating item)
Player - Add -50 to (Owner of (Hero manipulating item)) Current lumber
Else - Actions
Else - Actions
Custom script: call RemoveLocation (udg_Point_Temp)
Problem is either the game crashes, or nothing happens....