| 08-12-2003, 06:39 AM | #1 |
heres the trigger...its ment to give heor a potion if he kills(not damages) the targeyt unit with the spell Targ Events Unit - A unit Is issued an order targeting an object Conditions (Unit-type of (Ordered unit)) Equal to pally (Issued order) Equal to (Order(firebolt)) Actions Set Firebolttarg = (Targeted unit) Untitled Trigger 001 Events Unit - A unit Dies Conditions (Triggering unit) Equal to firebolttarg Actions Hero - Create Potion of Greater Healing and give it to pally why does it not working? how to fix?another way? |
| 08-12-2003, 10:23 PM | #2 |
help? someone must know how to do this |
| 08-12-2003, 10:26 PM | #3 |
(Triggering unit) Equal to Cointarg shouldnt it be equal to firebolttarg not cointarg? |
| 08-12-2003, 10:28 PM | #4 |
Does the spell automatically kill the unit or does it have a set damage? |
| 08-12-2003, 10:32 PM | #5 |
cointarg is rite (its a spell called coin toss based off fireblot it does 200 damage... EDIT: yeah sorrry bout that i change names to protect spell but nm ..i still wont work |
| 08-12-2003, 11:15 PM | #6 |
Use "Target unit of issued order". |
| 08-13-2003, 12:03 AM | #7 |
but then it will give him a potion even if unit still alive... |
| 08-13-2003, 12:13 AM | #8 |
Use this: Targ Events Unit - A unit Is issued an order targeting an object Conditions (Unit-type of (Ordered unit)) Equal to pally (Issued order) Equal to (Order(firebolt)) Actions Set Firebolttarg = (Target unit of issued order) Untitled Trigger 001 Events Unit - A unit Dies Conditions (Dying unit) Equal to firebolttarg Actions Hero - Create Potion of Greater Healing and give it to pally Just note that with these triggers, if the Paladin casts the spell on the unit and then it dies in another way, the Paladin will still get the potion. |
| 08-13-2003, 12:14 AM | #9 |
after the unit event put wait event |
| 08-13-2003, 12:43 AM | #10 |
yeah but i dont want that i just want if it unit dies by it.... what about a if,then,else command? is there an "if unit dies" ? |
| 08-13-2003, 01:14 AM | #11 |
<Coin Order> Events: Player 1 is ordered targeting an object Condition: Order string = firebolt Action: Set (ordered unit) = CoinCaster / Set (target unit of issued order) = CoinTarget <Coin Death> Events: null Condition: CoinTarget is dead Equal to True Action: Create Potion of Healing, give it to CoinCaster <Coin Cast> Events: Player 1 finishes or stops casting an ability Condition: Ability = Firebolt (ANfb) Action: Run Trigger Coin Death ( checking conditions ) If you don't have TFT you can use this (TFT triggers work on RoC, just have to use custom text): Code:
function Trig_Coin_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ANfb' ) ) then
return false
endif
return true
endfunction
function Trig_Coin_Cast_Actions takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Coin_Death )
endfunction
function InitTrig_Coin_Cast takes nothing returns nothing
set gg_trg_Coin_Cast = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Coin_Cast, Player(0), EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Coin_Cast, Condition( function Trig_Coin_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Coin_Cast, function Trig_Coin_Cast_Actions )
endfunction |
| 08-13-2003, 01:34 AM | #12 |
What type of variable is firebottarg? im making a trigger with a unit variable but the variable won't show up... Any Ideas? |
| 08-13-2003, 01:36 AM | #13 |
You can't use variables in events (Reg World Editor that is) |
| 08-13-2003, 01:37 AM | #14 |
i agree:ggani: |
| 08-13-2003, 01:43 AM | #15 |
what kind of condition is "coin death" (eg boolean ect) (Condition: CoinTarget is dead Equal to True) (?) |
