• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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

Status
Not open for further replies.
Level 5
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 5
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