Topic: Random number help
I'm trying to do something in a game engine. I know you really can't help with the details, but I need help with the syntax more or less.
What I have:
#==============================================================================
# ** Random_Maps
#------------------------------------------------------------------------------
# - Script will randomize maps for dungeons.
#==============================================================================
class Random_Maps
#=================
# - Main
#=================
def Game_Event
super
initialize(MAP001, EV001)
A = rand(2..4)
if (A = 2)
$game_player.reserve_transfer(MAP001, 036, 023, up)
else (A = 3)
$game_player.reserve_transfer(MAP003, 008, 002, down)
else (A = 4)
$game_player.reserve_transfer(MAP004, 014, 004, down)
end
#=========================
# End of first random dungeon event
#=========================
As you can see I want A (random number 2-4) depending on what number it chose to transfer the player.
Now the syntax looks fine to me, but when I actually run the game it gives me an error on: A =rand(2..4)
For each number, 2, 3, or 4. to Execute the variable