| 07-09-2008, 11:12 AM | #1 |
How would you implement easy mode? (make heroes get more XP from kills) EDIT: JASS:scope EasyMode globals public trigger trig // this trigger is turned off after repick time is over endglobals //=========================================================================== private function MakeItEasy takes nothing returns nothing call SetPlayerHandicapXP(GetEnumPlayer(), 2.0) // double XP endfunction //=========================================================================== private function Actions takes nothing returns nothing call DisplayTextToPlayer( GetLocalPlayer(), 0, 0, "|c0000FF00Host enabled EASY mode." ) set Game_EasyMode = true call ForForce(Players_ALL_HUMANS, function MakeItEasy) call DisableTrigger( GetTriggeringTrigger() ) endfunction //=========================================================================== public function InitTrig takes nothing returns nothing set trig = CreateTrigger() call TriggerRegisterPlayerChatEvent( trig, Player(0), "-easy", true ) call TriggerAddAction( trig, function Actions ) endfunction endscope Would this work? |
| 07-09-2008, 11:45 AM | #2 |
So long as Players_ALL_HUMANS is a properly set up group, and you call the InitTrig function (maybe make that private and an initializer?), then yes. |
