| 06-28-2004, 01:05 AM | #1 |
Hey, I'm working on a spell that makes a location that supposedly has a trap--it should web a unit (a special effect and pause the unit since you cant add a buff) when it runs over the region. Why isn't it working? There are 3 triggers. Also, when I try to give back the ability to the spider, it doesn't give it back. Code:
Spider Trap
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Spider Trap
SpiderTrap_Created Equal to False
Actions
Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Undead\VampiricAura\VampiricAura.mdl
Set SpiderTrap_Effect = (Last created special effect)
Set SpiderTrap_Point = (Target point of ability being cast)
Set SpiderTrap_Created = True
Region - Center Spider Trap <gen> on SpiderTrap_Point
Set SpiderTrap_Caster = (Casting unit)
Unit - Remove Spider Trap from SpiderTrap_Caster
Unit - Add Unsummon Spider Trap to SpiderTrap_CasterCode:
Spider Trap Triggered
Events
Unit - A unit enters Spider Trap <gen>
Conditions
Actions
Set SpiderTrap_Created = False
Special Effect - Destroy SpiderTrap_Effect
Special Effect - Create a special effect attached to the origin of (Entering unit) using Abilities\Spells\Undead\Web\WebTarget.mdl
Set SpiderTrap_Effect = (Last created special effect)
Unit - Pause (Entering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Spider Trap for SpiderTrap_Caster) Equal to 1
Then - Actions
Wait 3.00 seconds
Special Effect - Destroy SpiderTrap_Effect
Unit - Unpause (Entering unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Spider Trap for SpiderTrap_Caster) Equal to 2
Then - Actions
Wait 6.00 seconds
Special Effect - Destroy SpiderTrap_Effect
Unit - Unpause (Entering unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Spider Trap for SpiderTrap_Caster) Equal to 3
Then - Actions
Wait 10.00 seconds
Special Effect - Destroy SpiderTrap_Effect
Unit - Unpause (Entering unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Spider Trap for SpiderTrap_Caster) Equal to 4
Then - Actions
Wait 15.00 seconds
Special Effect - Destroy SpiderTrap_Effect
Unit - Unpause (Entering unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Spider Trap for SpiderTrap_Caster) Equal to 5
Then - Actions
Wait 20.00 seconds
Special Effect - Destroy SpiderTrap_Effect
Unit - Unpause (Entering unit)
Else - Actions
Do nothing
Unit - Remove Unsummon Spider Trap from SpiderTrap_Caster
Unit - Add Spider Trap to SpiderTrap_CasterCode:
Spider Trap Unsummon
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Unsummon Spider Trap
Actions
Unit - Remove Unsummon Spider Trap from SpiderTrap_Caster
Unit - Add Spider Trap to (Casting unit)
Set SpiderTrap_Created = False
Special Effect - Destroy SpiderTrap_Effect |
| 06-28-2004, 01:18 AM | #2 |
Well first of all, use start the effect of an abillity, second, why did you create all that trigger instead of using a dummy unit(use the hide unit action to make it unseen/unselectable) and then order it to cast ensnare? Another thing, for your last trigger, try adding the abillity first than removing the other |
| 06-28-2004, 04:48 PM | #3 |
Bah...Thanks... ^^;; I suppose I don't think too far ahead nowadays... >_> |
