| 02-26-2007, 11:43 PM | #1 |
For some reason this trigger works, but it doesnt give the player the score for the kill.. Is it because the castersystem doesnt get the player of the killing unit? JASS:function Trig_Flame_Mine_Conditions takes nothing returns boolean if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n007' ) ) then return false endif return true endfunction function Trig_Flame_Mine_Actions takes nothing returns nothing call CasterCastAbility( GetOwningPlayer(GetTriggerUnit()), 'A002', "flamestrike", GetDyingUnit(), true ) endfunction //=========================================================================== function InitTrig_Flame_Mine takes nothing returns nothing set gg_trg_Flame_Mine = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Flame_Mine, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Flame_Mine, Condition( function Trig_Flame_Mine_Conditions ) ) call TriggerAddAction( gg_trg_Flame_Mine, function Trig_Flame_Mine_Actions ) endfunction |
| 02-27-2007, 02:14 AM | #2 |
It would appear as though you didn't remember what I said the last time I corrected your code ![]() First, change this: JASS:function Trig_Flame_Mine_Conditions takes nothing returns boolean if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n007' ) ) then return false endif return true endfunction JASS:function Trig_Flame_Mine_Conditions takes nothing returns boolean return GetUnitTypeId(GetTriggerUnit()) == 'n007' endfunction Next, (just to be sure it is the caster system screwing things up), change the actions to this: JASS:function Trig_Flame_Mine_Actions takes nothing returns nothing local unit U = GetTriggerUnit() local real X = GetUnitX(U) local real Y = GetUnitY(U) set U = CreateUnit(GetOwningPlayer(U), 'YourDummyUnitsRawcode', X, Y, 0) call UnitAddAbility(U, 'A002') call IssuePointOrder(U, "flamestrike", X, Y) call UnitApplyTimedLife(U, 'Btlf', 5.00) // call CasterCastAbility( GetOwningPlayer(GetTriggerUnit()), 'A002', "flamestrike", GetDyingUnit(), true ) set U = null endfunction |
| 02-27-2007, 03:26 AM | #3 |
haha Pyro! im so sorry! i forgot about what you said lol, Alright i promise, from now on ill use that! haha =] If i dont, give me a good beat down please! lol thanks! |
| 02-27-2007, 03:41 AM | #4 |
So, is it the caster system? |
| 02-27-2007, 03:52 AM | #5 |
yeah i think it was because it gave the player the kill when i replaced it with your script.. meh well thanks again lol |
