ChangeRoom coordinates don't work

Started by d.n.d.r., Sat 21/03/2009 13:05:20

Previous topic - Next topic

d.n.d.r.

Problem is this.

Two characters and two rooms 223 and 236.

When i use this script:

cJoy2.ChangeRoom(236) ;
cEgo2.ChangeRoom(236) ;

Characters changes room and they really are there.

When i use this script:

cJoy2.ChangeRoom(236, 314, 472) ;
cEgo2.ChangeRoom(236, 491, 472) ;

Characters disappeard. I deleted room 236 and made a new one but still don't work.
I changed script that characters moves from room 222 to room 236. Still don't work.
Then i try to use PlaceOnWalkableArea script. That works but because i need those characters to be in certain place i can't use it. I also changed from 32 bit colours to 16 bit colours and still don't work. Same problem is in every room from 236 and up.

So ChangeRoom works if i don't use coordinates.

How can i make this work?


OneDollar

First thing to check is that those coordinates actually exist in the rooms. If, for example, your game is 320 by 240 resolution you'll be positioning the characters about two screens down from the top. Open up each room in the room editor, point your mouse where you want to move the characters to then check the mouse position value to make sure you've got the right coordinates. Another thing to check is that you've not got any walkbehind areas that are hiding them.

d.n.d.r.

Coordinates are ok. No problem there and there is no walkbehinds.

Characters are in the right room if i don't use coordinates and i check it with  Display("EGO is in room %d.", cEgo.Room);

There is another thing.

In room 236 i have two exits up and down. When i use PlaceOnWalkableArea script and try to move characters up they walk down. It doesn't matter where i put walk coordinates.

Trent R

You need to check "Use low-resolution co-ordinates in script" under the General Settings. Is it true or false?

The explanation of them can be found on the manual page entitled "Upgrading to AGS 3.1".


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

d.n.d.r.

I check the settings and it is true.

I made little test in false setting in room 1 and that was no good. Character didn't walk at all even it was in walkable area.

Is it possible that characters are somehow offscreen. Room 236 starts whith conversation and the wait cursor works even the is no character view and no conversation text.

The resolution in this game is 800x600.

OneDollar

If "Use low-resolution co-ordinates in script" is set to true, that means while each screen uses 800x600 pixels to draw background graphics etc, the actual resolution for walkable areas is 400x300. Try halving the values you're setting for the x and y coordinates. I'm pretty certain that the problem you're getting is with the characters somehow not being shown on the screen, rather than them not being moved to the correct room.

d.n.d.r.

That was the problem, now it works.

But i don't understand why rooms from 1 to 235 works perfectly without halving the coordinates and it makes no difference where and what size walkableareas are.

But anyway thank you for help and please visit the homepage.


SMF spam blocked by CleanTalk