- Joined
- Feb 18, 2007
- Messages
- 216
So, I have a weapon change system on my map. When you use an item (the weapon), the hero who used it will be replaced with different unit, who's armed with the new weapon. This is part of the system I'm currently using:
So could anyone help me with this problem?
-
Events
-
Unit - A unit Uses an item
-
-
Actions
-
If ((Unit-type of (Triggering unit)) Equal to Vault Dweller (Assault Rifle)) then do (Set ammoAssaultRifle = (Mana of (Triggering unit))) else do (Do nothing) (THIS IS OFC COPIED FOR EVERY POSSIBLE WEAPON)
-
Set exp = (Hero experience of marine)
-
Set levelMedic = (Level of Medic for marine)
-
Set levelExpMaster = (Level of Explosion Mastery for marine)
-
Set hitpoints = (Life of marine)
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
Set items[(Integer A)] = (Item carried by (Hero manipulating item) in slot (Integer A))
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions) (AND SO IS THIS)
-
If - Conditions
-
(Item-type of (Item being manipulated)) Equal to Laser Rifle
-
-
Then - Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
Hero - Drop the item from slot (Integer A) of (Hero manipulating item)
-
-
-
Unit - Replace (Hero manipulating item) with a Vault Dweller (Laser Rifle) using The old unit's life and mana
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
Hero - Give items[(Integer A)] to (Last replaced unit)
-
-
-
Selection - Select (Last replaced unit) for Player 1 (Red)
-
Unit - Set mana of (Last replaced unit) to ammoLaser
-
Set marine = (Last replaced unit)
-
-
Else - Actions
-
Hero - Set marine experience to exp, Hide level-up graphics
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
levelMedic Greater than or equal to 1
-
-
Then - Actions
-
Hero - Learn skill for marine: Medic
-
Unit - Set level of Medic for marine to levelMedic
-
Hero - Modify unspent skill points of marine: Subtract ((Level of Medic for marine) - 1) points
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
levelExpMaster Greater than or equal to 1
-
-
Then - Actions
-
Hero - Learn skill for marine: Explosion Mastery
-
Unit - Set level of Medic for marine to levelExpMaster
-
Hero - Modify unspent skill points of marine: Subtract ((Level of Explosion Mastery for marine) - 1) points
-
-
Else - Actions
-
-
Unit - Set life of marine to hitpoints
-
-
So could anyone help me with this problem?