Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: GM.6: Room Help code  (Read 746 times)

0 Members and 1 Guest are viewing this topic.

spinningsong

GM.6: Room Help code
« on: October 10, 2006, 07:42:28 pm »
I need help with rooms in my game.  ;D

Heres what i need help with.

Lets say, link starts off in the middle of room1, he leaves at the top of room1, then he goes around through deferent rooms until he re-enters room1 from the bottom. But instead of link appearing at the bottom of room1, he will appear at the middle of room1 where he starts off originally. Does any1 know how I can fix this?
I have no idea what i should do to make it so link starts where he should be... does any1 have code that i could use to fix this?

Does this make sense?
 :-\
« Last Edit: March 01, 2007, 01:12:24 am by 4Sword »
Logged

Jed

Re: GM.6: Room Help code
« Reply #1 on: October 11, 2006, 05:04:45 am »
You could have the whole map as one large room and have objects set up to scroll up wards, etc. Also you can set up the rooms creation code to read from a global variable set(x,y,facing,etc) and postion link that way.
Logged

A Storm in the Desert

Eternal Triangle
Re: GM.6: Room Help code
« Reply #2 on: October 11, 2006, 05:29:58 am »
  • Wear the Deku Sprout Smile :]
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 222
Hm. Do you mean that you have the Link object initially placed in the middle of the room? If this is the case, then you might have a problem. If the rooms are not persistent, you will have a new Link object created every time you re-enter this room. To solve this problem, it's generally a good idea to create a global variable called 'global.gamestarted' and use it in the Room creation code in this way:

if global.gamestarted=false
{instance_create(INSERT X Y CO-ORDS AND OBJECT NAME HERE); global.gamestarted=true};

If you could provide more specific details, then helping you would be easier ^^;
Logged
Surely you can do it!
Believe in your strengths...Believe...

        -Happy Mask Salesman
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.205 seconds with 40 queries.

anything