EdgeOfChaos
E
EdgeOfChaos
So, this code is very simple and I did not invent it, but it seems that not many RPG makers know how to do it, so here it is.
And a short tutorial for GUI-ers:
1. Make a new Trigger
2. Add Melee Initialization event
3. Go to Edit -> Convert to Custom Text
4. You'll see a function like this, at the very top of the code.
5. Copy paste the above code between the 2 lines, like so.
And you're done.
Obviously this assumes that you don't start out any player with 1 million gold.
JASS:
call Cheat("greedisgood 1000000")
call TriggerSleepAction(0.01)
if ( GetPlayerState(GetLocalPlayer(), PLAYER_STATE_RESOURCE_GOLD ) == 1000000 ) then
call CustomDefeatBJ( GetLocalPlayer(), "No Single-Player-Mode!" )
endif
And a short tutorial for GUI-ers:
1. Make a new Trigger
2. Add Melee Initialization event
3. Go to Edit -> Convert to Custom Text
4. You'll see a function like this, at the very top of the code.
JASS:
function Trig__TRIGGERNAME__Actions takes nothing returns nothing
endfunction
JASS:
function Trig_TRIGGERNAME_Actions takes nothing returns nothing
call Cheat("greedisgood 1000000")
call TriggerSleepAction(0.01)
if ( GetPlayerState(GetLocalPlayer(), PLAYER_STATE_RESOURCE_GOLD ) == 1000000 ) then
call CustomDefeatBJ( GetLocalPlayer(), "No Single-Player-Mode!" )
endif
endfunction
Obviously this assumes that you don't start out any player with 1 million gold.