|
Post by Jeremy LaCroix on Mar 23, 2004 15:18:34 GMT -5
Hi all I was invited here by someone over at the GM boards.
I have a few questions.
1.) All my rooms are persistant. This means that when all the enemies are killed, that is saved when the player exits the room, so the enemies only appear once as a result. I want them to be able to go back to the room to fight more monsters to level up.
2.) I have an infinite loop. When you go back to the previous room, you appear right on top of the object that sends you back to the room you came from, creating an infinite loop. The rooms are persistant so going back to the previous room puts you back where you left off on that room, which was touching the object that sends you to the other room, if that makes sense. Is there a way around that?
3.) How do I make the enemies chase objPlayer if they are close enough?
4.) I have a menu, thats another room. You press "M" and it takes you to the menu screen showing your stats. Pressing any key makes you go back to the previous room, however the previous room on the list is not necessarily the room you were in. How do I do this succesfully?
I have alot more but thats all for now, thanks!
|
|
|
Post by IsmAvatar on Mar 23, 2004 16:07:44 GMT -5
Welcome to the forums. Please register - it's free. 1) well then make them not persistent 2) when you leave the room, rather than just going to the next room, go like this: x = xprevious y = yprevious room_goto(room1) 3) if distance_to_object(obj_player) < 92 { move_towards_point(obj_player.x,obj_player.y,4) 4) when you press m, set global.lastroom = room to return to the last room you were in, type room_goto(global.lastroom)
|
|
|
Post by Noadi on Mar 23, 2004 16:09:52 GMT -5
1) don't use individual enemy objects except for bosses and other one time battles.
For turn based. Instead use a single object that generate the battles in a semi random way (number of minimum steps+random number). This object would send you to a battle room, and select the background, number of enemies, and type of enemy based on the original room you were in.
If your battle system is real time I'm not sure how to do this other than simply making the rooms no longer persistent.
2) Easy to solve, when you go to a room, set the coordinates for where your player object appears as different from the object that send you to the previous room.
3) Don't know.
4) In the object with the key control for sending the player to the menu create a global variable global.currentroom, and on the key press before sending the payer to the menu room set global.currentroom=room, then when you exit use room_goto(global.currentroom).
IA: changed 2 "you"s to "your"
|
|
|
Post by JLaCroix on Mar 23, 2004 18:54:24 GMT -5
Wow, what alot of feedback!!! Thanks
When it comes to the rooms, I can't make them nonpersistant, if you enter or exit a house, any movement between rooms depends on this. If there is another way to move from room to room I would probably do it, but without persistance when you go to the previous room obj_player would just be created where its created when the room was first created.
The battle system is realtime.
for the XPrevious and YPrevious how does that work? Would it allow me to remove persistance?
BTW If the rooms are change to be non persistant, wouldn't that break the menu system also? It sounds to me that without it the room would restart each time, I only want the enemies to restart.
I am thinking of a battle room though, that may work!
I am going to try this all out and will let you guys know tomorrow, thanks again!
|
|
|
Post by IsmAvatar on Mar 23, 2004 22:14:40 GMT -5
Exactly.
O.o
BTW. please register, we'd love to have you here. it's free.
|
|
|
Post by JLaCroix on Mar 24, 2004 12:22:34 GMT -5
I will register, but probably later because I type this stuff at work and I don't want to get in trouble. I will try what you said, though...
|
|