Roku
New Member
- Reaction score
- 3
Hey,
When i was really thinking im starting to get a hang of JASS, i got very disappointed that a simple trigger doesn't work. I tryed changing many things back as they were, but it still isnt working.
Yes i know i have BJ's and the cond is wierd, those were the things i changed back and was hoping that it will work properly but it isnt. The scope name is the same as the trigger name, the rawcode is good, and none of the debug messages are showing up.
When i was really thinking im starting to get a hang of JASS, i got very disappointed that a simple trigger doesn't work. I tryed changing many things back as they were, but it still isnt working.
JASS:
scope SinisterStrike
private function Cond takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 039;A008039; ) ) then
return false
endif
return true
endfunction
private function Action takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer s = GetHeroAgi(u,true)
local real c = I2R(s)
local real r = GetRandomReal(0.95,1.05)
call BJDebugMsg("Init Trig")
call UnitDamageTarget(u, GetSpellTargetUnit(), (700 + c) * r, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL , WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
//===========================================================================
public function InitTrig_SinisterStrike takes nothing returns nothing
local trigger t = CreateTrigger()
call BJDebugMsg("Run Trig")
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Cond ) )
call TriggerAddAction( t, function Action)
set t = null
endfunction
endscope
Yes i know i have BJ's and the cond is wierd, those were the things i changed back and was hoping that it will work properly but it isnt. The scope name is the same as the trigger name, the rawcode is good, and none of the debug messages are showing up.