KAKASHIFAN727'S PROFILE

Search

RM2k3- Active Encounters Using Random Groups Stored in a Variable

Alright, I've been able to do the actual active enemy thing. That on its own with one Monster Group works fine; however, I'd figure it'd be nice to save time if I could use a variable to store a multiple number of monster group ID in that it could randomly choose between. I'd like it to be based on the map terrain the player is currently walking on, which would obviously need another variable. I can't seem to make the event initiate correctly; it gives a black screen and says it can't find the mosnter group. I put it in the Common Event section since I want to call on both of these every time I generate an enemy on the map. Here's the code that generates the active encounters:

Memorize Location: Map_Pos, X_Pos, Y_Pos

Switch Op. Encounter ON'
Call Event: The One Below that chooses for us
Enemy Encounter: Normal, with Monster ID Stored in Variable Encounter Type
Jump to Label 1
Else
End
Recall to Location: Map_Pos, X_Pos, Y_Pos
End Event Processing


Here is the code for determining the Terriain and making the encounters. This could probably use more work; I'm more familar with GameMaker which uses a totally different type of coding-- so I tried to model it based on how I would do it that way. Basically I want it to choose between X number of things, this stored in a varaible and at random. I know there is a better way to do this; I'm still figring it out. I'm probably missing something stupid and obvious.

Store Terrain ID: CharX, CharY (Probably gonna change these), Terrain ID

Branch if Var Encounter_Type is 1
Enemy Encounter: Normal, GroupName
Else Handler
if Branch Encounter_Type is 2
Enemy Encounter: Normal, GroupName2
Else
//Same until we get to 4
End Event Processing
End
End Event Processing
End //Repeat 4 times
Pages: 1