Trying to script it so a character leaves a room and goes to ANOTHER one.

Started by certainlynotharry, Wed 27/08/2003 11:30:50

Previous topic - Next topic

certainlynotharry

That's about it. I've designed a fairly elaborate setup of my own house, and I've set it up so that the hotspots make the rooms go into the hallway, or the bedrooms, or whatever, but I find that I can get INTO any room from the hallway, and yet I can't get back out of that room. I have set up the hotspots in the other rooms, but when they exit a room, the next room they arrive in is the same one. It's probably something really stupid, but I'm new at this, and I checked the tutorial and there's very little about it in there.

Also, I every time I try to go into room 4, it puts me in room 3. No matter what I do.

So I just want to know everything I should know about this stinking game's room-switching. Oh, and, uh, I'm new to the boards, yada yada yada.

dtm1980

Allright tryin to help you:
I think you got some doors in a doorway with hotspots on these doors.
Set the walk to points of the hotspots below the door, so that your character can walk there.
If you pick hotspot for door 1 for example, pick "interaction" and "Player stands on hotspot" then "Go to a different room (at specified co-ordinates)". A window with 3 options appears. Pick the room that you go from door 1. Lets think it is the kitchen. Set the coordinates where your player shall appear in the kitchen.
If you want to go back to the doorway, do the same as before: make a hotspot on the door,and so on, but set the room number in "Go to a different room" to the one of the hallway.
For more than one door in a room you of course need more than one hotspot. every door needs its own hotspot. And whenever "Go to different room" appears you must pick the right number of the next room where you want to go.
You can see the right room number in "Game editor - Room editor"
1 hallway
2 kitchen
3 living room
.... and so on


SSH

You need to make sure that you don't place the player in the new room on top of a change room hotspot: otherwise they may instantly come back to where they came from. You can work around this by using regions instead of hotspots and a global integer which is set on entering a room and cleared by walking off a region and then only do the change room interactions if the global int is cleared...
12

SMF spam blocked by CleanTalk