Uploaded by rexfurry on Apr 20, 2010
A Game maker tutorial showing you how to switch in and out of rooms in your game. This works in Game maker lite and pro! (^_^)-b
Player Step code:
if keyboard_check(ord("A"))
{
hspeed=-4
}
else if keyboard_check(ord("D"))
{
hspeed=4
}
if !keyboard_check(ord("A")) and !keyboard_check(ord("D"))
{
hspeed=0
}
if keyboard_check(ord("W"))
{
vspeed=-4
}
else if keyboard_check(ord("S"))
{
vspeed=4
}
if !keyboard_check(ord("W")) and !keyboard_check(ord("S"))
{
vspeed=0
}
if collision_rectangle(x+1,y+1,x+31,y+31,obj_wall,0,1)
{
hspeed=0
vspeed=0
}
Player Collision with wall code:
hspeed=0
vspeed=0
Exit block Collision with player code:
room_goto(rm)other.x=X
other.y=Y
Exit block collision with wall code:
hspeed=0
vspeed=0
Exit block UP code:
rm=rm_name of your room
X=x
Y=room_height-65
Exit block DOWN code:
rm=rm_name of your room
X=x
Y=33
Exit block LEFT code:
rm=rm_name of your room
X=room_width-65
Y=y
Exit block RIGHT code:
rm=rm_name of your room
X=33
Y=y
Category:
Tags:
- game maker
- game maker lite
- game maker platform
- game maker platformer
- game maker zelda
- game maker zelda tutorial
- game maker zelda room
- room switching
- game maker next room
- rexfurry
- game maker basic
- game maker platform tutorial
- rexer95
- room
- switch
- change
- game maker portal
- game maker other room
License:
Standard YouTube License
-
30 likes, 1 dislikes
Link to this comment:
Uploader Comments (rexfurry)
All Comments (92)
-
@rexfurry ok
OfficialNeilnet 1 day ago
-
ERROR in
action number 1
of Collision Event with object playerr
for object exit:
Error in code at line 1: room_goto(rm)other.x=X ^
at position 11: Unknown variable rm
Yes rooms are labeled rm_ and player is persistent
QuarstyAndZack 4 days ago
-
this strategy works better then the update for if you want to switch in the middle of the room, as if
entering a house.
SPARTAgoneROCK 1 month ago
-
@technonerd100 example: room_goto(r_room)
code: room_goto()
ghost22525 1 month ago
-
make a tutorial about when we press a key the obj will shoot like a bullet come out from its weapon.......
TazziFuyoo005 2 months ago
6:44
Game Maker 8 - Creating a basic plat-former levelby natelair30,437 views
0:59
How To Make A Room Follow More Than 1 Object Game Makerby secret21bobby1,776 views
0:43
Doom clone - fake 3d for game maker liteby DarksoftGames5,041 views
2:41
Game Maker: Zelda Engine Testby willfex917,964 views
8:12
[[GML]] Best Room Changing Method in GMLby Wizirdi3,470 views
1:01
ninja mario game maker liteby DarksoftGames1,718 views
8:36
make cool titles with game makerby psyguy085,298 views
6:19
Game Maker 8: How to make platform enemies.by HouliGM24,798 views
7:01
Platform Shooter Game Maker Tutorialby lincomberg3142,732 views
3:29
Game Maker: Switch To Open Door Tutorialby clessigmaster2,516 views
7:50
Game Maker Tutorial Using Money & Item Shop CAVEMAN FRIENDLY HQby TheRetryThis4,916 views
1:38
Game Maker - Tutorial 4 - Viewsby ronsgameproductions2,571 views
14:42
Game maker Zelda Tutorial 1by DarkLinku111,254 views
1:00
Platformer Game Door Codeby TheMagdiel1,009 views
6:14
Game Maker 7 how to make doors and keys!by xsdsdds12,345 views
9:56
game maker platform tutorial part 1by rexfurry9,348 views
1:09
Game Maker 8 Platformer Test - Bugs Featured - NEED HELP!by twoofclubs221,522 views
10:57
How to Make a Zelda Game in Gamemaker (Part 1)by hamie9620,231 views
4:35
Game Maker Tutorial - Maximum Lives/Heart Containersby GameMakerCrab1,817 views
- Loading more suggestions...
u deserve a hug! hey guys I think the code is wrong for the player movement so you'll need to do it manually, thats what I think I don't mean to be a troll
OfficialNeilnet 2 days ago
@OfficialNeilnet Oh no! I'm sorry, I just received your comment then noticed everyone else s (for some reason my comments haven't been showing up lately) Anyway, I'll try to get on that code thing as soon as I can ^)^
rexfurry 1 day ago
I'm new to this, and I was just wondering if you would try to help me with a problem I'm having. When I'm trying to go to the next room I get a message saying:
___________________________________________
FATAL ERROR in
action number 2
of Step Event
for object obj_ship:
Moving to next room after the last room.
Could you help me out with this please?
trivettz 6 days ago
@trivettz Is that the whole error?
rexfurry 6 days ago
Hey everyone, for those of you who posted questions and other comments that didn't get posted, for some reason I had to approve some of them (it's odd because the comments for this video are set for automatic o_o). Anyway, I went through and approved them all ^)^
rexfurry 3 months ago
i did pefect what you did say but it just dussent work
TheBGGAST 5 months ago
@TheBGGAST Hmm, well I can't really help you if I don't know exactly what the problem is. I need to know things like, what was the error, or what about it didn't work. Also, I would recommend using my new and updated room switching tutorial which I have placed in a little annotation in this video.
rexfurry 5 months ago