- Joined
- Sep 12, 2008
- Messages
- 657
Hey,.. i couldnt find a tutorial that could really help me..
so i started messing around with the custom text place..
(Jass new gen, auto complete)
i did this:
made a gui trigger, added event + condition, changed to custom text
changed the condition to what ever i needed,
then added this:
i just want it to crete the unit.. thats all..
thanks for who ever can help..
so i started messing around with the custom text place..
(Jass new gen, auto complete)
i did this:
made a gui trigger, added event + condition, changed to custom text
changed the condition to what ever i needed,
then added this:
JASS:
function Trig_Jass_Ability_Test_Conditions takes nothing returns boolean
local string AbilityRawCode = "A000"
if ( not ( GetSpellAbilityId() == S2I(AbilityRawCode) ) ) then
return false
endif
return true
endfunction
function Trig_Jass_Ability_Test_Actions takes nothing returns nothing
local string AbilityRawCode = "A000"
local string DummyRawCode = "Hpea"
local location UnitSpawnLocation
set UnitSpawnLocation = (GetRectCenter(gg_rct_Jass_Test))
call CreateUnitAtLoc( Player(0), S2I(DummyRawCode), UnitSpawnLocation, 180 )
call UnitAddAbility(GetLastCreatedUnit(), S2I(AbilityRawCode))
endfunction
//===========================================================================
function InitTrig_Jass_Ability_Test takes nothing returns nothing
set gg_trg_Jass_Ability_Test = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Jass_Ability_Test, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Jass_Ability_Test, Condition( function Trig_Jass_Ability_Test_Conditions ) )
call TriggerAddAction( gg_trg_Jass_Ability_Test, function Trig_Jass_Ability_Test_Actions )
endfunction
i just want it to crete the unit.. thats all..
thanks for who ever can help..