AEROGP'S PROFILE

Search

Filter

Problems with Game_Unit

EDIT: Nevermind, you were right in a way. members = defined members as local instead of using the method called members. Removing that and setting @battlers = instead solved that.

I had another problem, too, but I think I know how to resolve it. I'll post again if I don't get any results. Until then, thanks.

Problems with Game_Unit

After getting back into RPG Maker and successfully implementing a turn-based system in VX, I'm now trying to implement a turn order framework. I've managed to grouped together the functions used to determine turn order in a class Game_Battlers, inheriting from Game_Unit, without breaking the combat system. Now to make things simpler for the system, I tried to put $game_party.members and $game_troop.members into a single array "@battlers", which like the former two can be referenced with the method "members," and is initialized in Game_Battler before anything else.


#--------------------------------------------------------------------------
# * Initial Battlers Setup
#--------------------------------------------------------------------------
def setup_members
members = []
for i in $game_party.members + $game_troop.members
members.push(i)
end
end

There's a bug in this method, and I want to know what it is. To make sure it wasn't anything else, I setup combat to automatically start a game over if members.empty? returns true, and unsurprisingly it does. Naturally, this would cause the combat to break down into an infinite loop of @active_battler being nil, which is why I had to test it in this way. When I tested to see if the native members were okay, though ($game_party.members and $game_troop.members), they returned false - they weren't empty, yet members was leaving the method empty anyways.

Just be sure it wasn't the way I was doing it, I changed the method to a single line: members = $game_party.members + $game_troop.members. Short, sweet, and to the point, yet still nada. Just what the heck is going on here, and what can I do about it? Just solving it is not enough, either - I need to know the cause so I can avoid it in the rest of my code.

[Community Project] Missiongarde -- Class refining in progress

If you don't mind enemies having costless spells at their disposal, you can use Max MP as the ID.

Here's some crappy sounding songs I made

You guy sure give a lot of attention to bad material...

What do YOU like in an RM game?

author=kentona link=topic=3552.msg72325#msg72325 date=1240703641
That is, games are fun if we are learning subconsciously.

It can be less fun when learning is the game's active intent.

I guess I can post these here...

EDIT: Well, it looks like the server already went down, so... I'll upload them elsewhere. =/

The good stuffs
Main Menu theme
Tropical level
Boss theme
That song from Megamix... <_<;
Canyon level Act1
Canyon level Act2
Ice level
Metropolis under attack!
Leaf Forest prototype
Balloon Park (S3&K)

Not all glitter is gold
Eggman's base?
Another Canyon theme?

I have plenty more, on request...

I DESPERATELY Need Someone to Teach me how to Use Game Maker!!

Use your help file. There's a huge section on GML that you should be looking at, and it's pretty well documented. If you find it confusing, I can't recommending anything more than to just look up tutorials on C-programming, as GML is basically the same thing only without the messy stuff (such as memory management and garbage collection)

I could help you more if your question weren't so unspecific. At least try to figure out what you need to do first...

(NOTE: You probably won't ever need Paths or Time Lines if you make your game correctly, so that's 2 things you can scratch off the list of "confusing features").

Indie vs. Amateur - an article everyone should read

Drama over amateurism makes for a must-read?

Guess the Game!!!

Aww, shoot. I was still stuck on Custom Robo...

Community History



"Try again, kid."