Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: AnasAbdin on Tue 09/12/2014 09:37:24

Title: Walking outside room borders problem
Post by: AnasAbdin on Tue 09/12/2014 09:37:24
Hello :-[

I am not getting the desired effect when making characters walk/move outside the room's borders in the negative areas.
The same applies when moving objects as well.

AGS 3.3.0

Code (ags) Select
cEgo.Walk(330, -30, eBlock, eAnywhere);

Some glitghy movement happens instead.
I found a previous video of the effect in action too. The asteroid is supposed to move to a negative X coordinate [0:16 seconds]:
[embed=640,390]http://www.youtube.com/watch?v=bwt-zbvoYcg#t=16[/embed]
Title: Re: Walking outside room borders problem
Post by: Crimson Wizard on Tue 09/12/2014 10:02:09
Do you have anything in repeatedly_execute_always script that may affect moving characters and objects?
Any regions at room borders?
Title: Re: Walking outside room borders problem
Post by: AnasAbdin on Tue 09/12/2014 10:06:09
Code (ags) Select
function repeatedly_execute_always() {
 

 
  // Put anything you want to happen every game cycle, even
  // when the game is blocked inside a command like a
  // blocking Walk().
  // You cannot run blocking commands from this function.
 
}


Virgin (roll)
...and no regions as well.
Title: Re: Walking outside room borders problem
Post by: Crimson Wizard on Tue 16/12/2014 09:13:20
I was able to reproduce this using following instructions from AnasAbdin:

Quote
I created a new 'default game'
640x400 32bit

I made a walkable area on the entire room 1.
Ego starting position is 160,160

Then created a hotspot when interacted with, this happens:

cEgo.Walk(-50, 200, eBlock, eAnywhere);
he walked to the desired location.

but when I tried this:
cEgo.Walk(200, -10, eBlock, eAnywhere);

it glitched this way:

Ego turned around to face left.
Ego suddenly was positioned at (0, 160) << Ego.y
Ego walked up to (-1, -200) << I used Display to get his xy...

so apparently it happened with the Y being negative...

I have a difference though, in my case the player stops at (-1, -10).

Reproduces in 3.2.1, 3.3.0 and 3.4.0 alpha.
Title: Re: Walking outside room borders problem
Post by: Crimson Wizard on Tue 16/12/2014 09:43:55
There was a silly type conversion error that caused coordinates to overflow and get incorrect sign :D.

Will be fixed in 3.3.3 (I'll make an update today).
Title: Re: Walking outside room borders problem
Post by: AnasAbdin on Wed 17/12/2014 05:43:10
Thanks a lot Crimson Wizard. The amount of respect and appreciation I have towards your work is unlimited :)

Now I have an extra question:
Will using the newer AGS version affect the game in anyway other than moving to the minus realms perfectly?
Title: Re: Walking outside room borders problem
Post by: Crimson Wizard on Wed 17/12/2014 08:53:16
Quote from: AnasAbdin on Wed 17/12/2014 05:43:10
Now I have an extra question:
Will using the newer AGS version affect the game in anyway other than moving to the minus realms perfectly?
Yes... there is a list of changes.
For 3.3.2: http://www.adventuregamestudio.co.uk/forums/index.php?topic=51051.0
For 3.3.3: http://www.adventuregamestudio.co.uk/forums/index.php?topic=51425.0