Error with ChangeRoom script

Started by Wizzard, Sun 12/06/2011 15:29:00

Previous topic - Next topic

Wizzard

Using the script:

player.ChangeRoom(1, 40, 198) with a leave from right edge, causes the player to go back to the wrong room!!##***
Life is an adventure, but unfortunately you don't get restore points!!

Matti

Make sure that 40, 198 aren't placed on an edge/region in room 1 that causes the player to change the room again.

Wizzard

#2
Oh blast!, I've just installed v 3.1.2 and no problems. I've deleted the game files from the 3.2.1 version and started making another game. Unfortunately the game files wont run on both versions.
I'll re-install the latest version again and make a note of your comments about the x,y positions clashing.
Dummies were flying everywhere!! ::)

Thanks for your help :)

EDIT: I've changed my mind, I'll stick with 3.1.2. It's got everything I need and no hiccups so far. :D
Life is an adventure, but unfortunately you don't get restore points!!

monkey0506

There's not any changes to the behaviour of Character.ChangeRoom between AGS 3.1.2 and 3.2.1 that I'm immediately aware of off the top of my head. This was almost certainly a case of user-error and didn't actually have anything to do with the AGS version.

You can certainly use 3.1.2 if you want, but downgrading the AGS version isn't always going to be a solution for this type of problem.

dbuske

It happens to me once in a while that I put the character on the edge of a changeroom hotspot and then end up in the wrong room.
What if your blessings come through raindrops
What if your healing comes through tears...

Wizzard

I've now re-installed 3.2.1 and being very careful about returning to hot spots etc. I definitely messed up somewhere to make it happen in the first place. Thanks everybody for your input.
Now going ahead with a game I've been planning for a while. There's a lot of scripting stuff to learn but there's a lot of fun to be had in the process.

Best Wishes to all

Mike
Life is an adventure, but unfortunately you don't get restore points!!

monkey0506

dbuske, you seem to be describing both the problem and the solution pretty effectively. If you're sending the character to a room at coordinates at which you're telling the game, if the player is at these coordinates, send him to another room, then it's doing exactly what you're telling it to do. Just be aware of what coordinates you're sending the player to when changing rooms and you can avoid this problem.

SMF spam blocked by CleanTalk