Jump to content


DcoldSaviour77

Member Since 23 Dec 2011
Offline Last Active Dec 22 2012 11:38 PM

Topics I've Started

does gamemaker recognize regions of x or y

22 December 2012 - 08:50 PM

So i have a code checking the collision "x"("y" doesn't matter) but i want the "x" variable to be within a certain region. Since nothing happens i wonder if gamemaker doesn't recognize it or i'm not putting it in the right way. This is what i have.
if place_meeting(140<x<180,y,player)
Thank you

Mario leaving the pipe

21 December 2012 - 12:20 AM

Alright I'm making a couple levels for a Mario game remake and I've ran into a problem with Mario leaving the pipe. So here's the problem, Once Mario jumps in the pipe and goes to the different room he appears right above the pipe(without doing the animation of coming out slowly). So he just appears there above it and I don't know why he gets there so fast. Lol. Here's the code for Mario coming out the pipe.
if instance_exists(mariopipingup_obj)
{
  with(mariopipingup_obj)
  {
   while (mariopipingup_obj.y > grnholepipeupexit_obj.y)
  {
    y-=1
  }
  }
}
So my pipe system is when Mario enters the pipe it sets off a variable where he'll go to the proper exit pipe. In the specific object creation of the exit pipe if the pipe variable is true it'll make mariopiping object inside the pipe and start the script code above. If there is a better way to do the pipe system I'm ready to learn it.

Repeating a code

24 November 2012 - 07:58 PM

It's been a very long time since I used gamemaker, so I come to the community for some help. Making a little adventure game and I'm in the process of making the loading and saving. I got the saving part (didn't forget how to do that  :biggrin:/>) But the loading part I'm not sure how to do this with multiple load files here is the code I have.
value=show_message_ext("Do you wish to load?","Yes.","","No.")
if value=0
{
 value=3
}
if value=1
{
 twovalue=show_message_ext("Load which file?","Game 1","Game 2","Game 3")
 if twovalue=1
 {
  if !file_exists("Savegame1")
  {
   value=show_message_ext("Do you wish to load?","Yes.","","No.")
  }
  else
  game_load("Savegame1")
 }
 if twovalue=2
 {
  if !file_exists("Savegame2")
  {
   show_message("File does not exist!")
   value=show_message_ext("Do you wish to load?","Yes.","","No.")
  }
  else
  game_load("Savegame2")
 }
 if twovalue=3
 {
  game_load("Savegame3")
 }
}
if value=3
{
 exit
}
As one can see when I start to ask if the save file doesn't exist to say "it doesn't exist". I got that only I need to make it repeat the code from the beginning. If the answer is obvious I apologize. Thank all for any assistance.

Finding out where a collision occured

07 April 2012 - 02:15 AM

Hi, guys. I'm making an effect when a collision occurs with the player and an enemy. So I need to create the effect exactly where it occurred. It's a platform game I'm making so, obviously the "y" value will always be the same, but I need to know find out where it occurred with the "x" value and create the effect at the "x"  value position.
:thanks:

depth layer trouble

03 April 2012 - 10:58 AM

In my mario game I have made a piranha plant. I have completed its movements the collisions with mario and such. My only problem now is making it go behind things when it goes down. I changed its depth layer but I can still see it above the tiles. So my question is can one make objects go behind tiles in Gamemaker or is this not possible?
:thanks: