Next room d&d won't work

C

Cole Train

Guest
Please help. I am making a game that when you collide with the exit object it will take you to the next room. But after I changed the controls to the player it won't work. I did a simple drag and drop. I don't know why it won't work. And I don't know code so if there is a solution with d&d please tell me if not. Well then code please.
 
A

Aura

Guest
Welcome to the GMC~♫

We can tell you how to do it in GML, but using D&D isn't the problem. D&D actions work as good as their GML equivalents, so you'd probably want to share some information in this regard. If you are using D&D icons, you can still "post code". Open up any object and click the "Show Information" button in its properties. You can then post the relevant parts in your topic. Also does it simply not work or does it throw an error message? If it is the former, make sure that both the objects have valid collision masks and you're using the Collision event. If it is the latter, please post the error message.
 
C

Cole Train

Guest
Ok so I checked the information and I don't see anything wrong at least I'm not sure what I should be looking for. I even tried persistent but no luck. There is no error it just doesn't work. I hit the object and nothing happens. Also I have already assigned a collision event to the exit object with a next room action and a bounce action. Both and one or the other and nothing is happening. I have even tried to just make a collision event with no action but it disappears. I am so lost. I am also lost on the code suggested not sure where it goes. Don't understand code at all.
 
D

Daquaris Chadwick

Guest
Hello,

First, please show the properties of the object. You can still post the "show information" from the properties. That would help us greatly in assisting you. Second, I would recommend that you put a show_message() (its in d&d too, you'll just have to find it) for the collision event to see if the collision event is triggering. If the event is triggering then there should be no problem unless you have a wrapping clause around the room_goto d&d. If that is the case, I would also recommend putting a show_message() just to make sure the code is getting there. Unfortunately, that is the most I can help with as I cannot see the state of your objects (see my first statement or Aura's statement)

In particular, I would like to see the information from the Player and the Exit Object.
 
C

Cole Train

Guest
Sorry I am don't really understand what you are talking about Daquaris. I look up the show_message but still don't understand. I don't really know anything. I started a few months ago and doing some tutorials. But I did take screenshots of the info for my to main objects that are causing me trouble. One is obj_character and the other is obj_exit. I tried to take a picture of the actual instance in the game that was not working but the file was too big. I really appreciate this help.
 

Attachments

A

Aura

Guest
Before anything else, learn how events work. At the very least, learn how the Create, Destroy, Step, Draw and Collision events work.

As for @Daquaris Chadwick's suggestion about using show_message(), it is basically for checking if the event triggers or not. If it does then a message would should show up. It is basically the GML equivalent of the Show Message D&D action. Read the Manual.

As for @KingdomOfGamez's suggestion, since you need to check it every step, you'd use the Step event. Read the Manual.

As for my own suggestion, copy-paste everything that you have got in the Information here. Read more about collision masks here:

http://docs.yoyogames.com/source/dadiospice/001_advanced use/more about sprites/index.html
 
C

Cole Train

Guest
Ok so interesting test I did. I changed my control settings for my character and it fixed my exit situation. But now I don't have the controls I want. So This is a copy of my control code I copied from the net. Is there anything in the code that caused my earlier issue?

if keyboard_check(vk_up) && place_free(x,y-5) {y-=5}
if keyboard_check(vk_down) && place_free(x,y+5){y+=5}
if keyboard_check(vk_right) && place_free(x+5,y){x+=5}
if keyboard_check(vk_left) && place_free(x-5,y){x-=5}
 
C

Cole Train

Guest
I did. I just changed it and know it works. HOW THE HELL did that fix it? It was always solid and it never did that before. Something to do with the control code?
 
Top