Skip to content

Instantly share code, notes, and snippets.

@theQuazz
Created May 15, 2013 22:47
Show Gist options
  • Select an option

  • Save theQuazz/5588043 to your computer and use it in GitHub Desktop.

Select an option

Save theQuazz/5588043 to your computer and use it in GitHub Desktop.
JASS Function Interfaces Its not actually ActionScript
scope SomeExample initializer onInit
// requires DamageEvent
// not sure how scoping will work...
function AhhWeJustGotDamaged takes unit damagedUnit, unit damageSource, real damage returns nothing
debug call BJDebugMsg( "We just took " + R2S( damage ) + " damage!" );
endfunction
private function onInit takes nothing returns nothing
call RegisterDamageResponse( Response.AhhWeJustGotDamaged )
// we might need to use Response.SomeExample_AhhWeJustGotDamaged instead
endfunction
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment