• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] What is the JASS for: Disable a Players Ability by ID?

Status
Not open for further replies.
Level 6
Joined
May 27, 2007
Messages
162
Hey,

So I'm trying to learn JASS through converting the GUI and trying to understand the syntax etc...


function Trig_DisableShare_Copy_Func001002 takes nothing returns nothing
call SetPlayerAbilityAvailableBJ( false, 'Aall', GetEnumPlayer() )
endfunction

function Trig_DisableShare_Copy_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_DisableShare_Copy_Func001002 )
endfunction

//===========================================================================
function InitTrig_DisableShare_Copy takes nothing returns nothing
set gg_trg_DisableShare_Copy = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_DisableShare_Copy, 1.00 )
call TriggerAddAction( gg_trg_DisableShare_Copy, function Trig_DisableShare_Copy_Actions )
endfunction



It is this line here I think I need to change:

call SetPlayerAbilityAvailableBJ( false, 'Aall', GetEnumPlayer() )

Should the function 'SetPlayerAbility...' be something different, ie, SetPlayer...ById?
'Aall' - should this be the ID of the ability I want to disable ('852566')

Thanks Hivers
 
Level 6
Joined
May 27, 2007
Messages
162
So, 'Aall' and '852566' are the same thing? And are both recognized as Integers?

Remember, you helped me with this a while ago:
call IssueTargetOrderById (GetEnumUnit(), 852566, GetEnumUnit())

That would work as 'Aall' as well? Just curious here!
 
Status
Not open for further replies.
Top