Walking outside room borders problem

Started by AnasAbdin, Tue 09/12/2014 09:37:24

Previous topic - Next topic

AnasAbdin

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
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]

Crimson Wizard

#1
Do you have anything in repeatedly_execute_always script that may affect moving characters and objects?
Any regions at room borders?

AnasAbdin

Code: ags
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.

Crimson Wizard

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.

Crimson Wizard

#4
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).

AnasAbdin

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?

Crimson Wizard

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

SMF spam blocked by CleanTalk