Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Goldenrod111

#1
I haven't posted for a while, and have just read the "This Forum is For/Not For:"s. "If you ask when the next version is coming out, you will be slapped silly with a moist trout." ;D

Anyway, I am using the Keyboard Movement module that comes in the default game teplate, though I brought it into a game using the emply template, and might be missing some things that I need to have in the global script. My character can move nicely, but he stops moving when he goes into another room. As I want to create the illusion that the rooms are continuous, this is a relitively large problem. I am using the Pressing Mode, but currently the player has to let go of the button and then press it again to move.

Secondly, is there any way to restrict the movement of the character to just four directions (up, down, left, and rigt) with the module, preferably having the player turn in the direction of the second key when it is pressed? (I have less sprites to draw if there is a way to do this ;), butI might decide to make them anyway and make the game a bit more realistic.)

Thirdly, is there any way to make the character run (6 seems to be a good speed in the character editor) when the left shift button is pressed, and walk (speed 3) otherwise?

Finally, to help create the feeling that almost the entire thing is one big room I added some pixels from the next room so the background would scroll to keep the player in the middle of the screen, but I was figuring in having a GUI at the bottom of the screen, and forgot that the GUI didn't change the size of the rest of the screen. Is there any way for the GUI (which should always be open) to reduce the avalible screen area?

I know that some of the questions relating to the arrow keys were already discussed on different threads, but they were from before the Keyboard Movement module, and I thought that there might be another way that I can do it now.

Edit: I have found another problem. I am currently testing the game with two rooms, one located "north" of the other, and am switching between the two with player.ChangeRoomAutoPosition. This works, but after the player takes a step after reentering room 1 he gets flung back to room 2. I attempted to use the following code (properly linked to in the room properties and also tested with <) to reset his position, but it doesn't work.
Code: ags

function room_Load()
{
  if (player.y == Room.TopEdge){
    player.y = Room.TopEdge + 2;
  }
}

Also, is there any way to set the area with which the player tests the walkable areas?
#2
I want to have a region where, if the player is any character except character 2, he stops and moves back off of the region. I found a similar topic here, but my usage is somewhat different. It sounds like their region is rectangular but mine isn't (see below). Also, from looking at the code, it looks like they have their character walking to a certain spot. I want my character to walk off the region, but not go to the same spot every time or walk a long distance. Can someone help me with this? I am using v3.0.

Code: ags
function region1_WalksOnto()
{
  if (player.ID == 2){
  }
  else{
    Display("Since the ground doesn't look very sturdy, you deside not to walk there.");
  }
}

SMF spam blocked by CleanTalk