Character Following Cursor without alignment...

Started by I<3Pindorama!, Thu 18/12/2014 21:50:08

Previous topic - Next topic

I<3Pindorama!

A new question haunts me and here I am abusing your generosity.  :-D

Well...
I used the LW_BAS_V2.0 Default from AGS
and I created an animated cursor and animated character:

Spoiler
[close]
*http://s22.postimg.org/ddbke59z5/tela1.png

Scouring the "questions files" in this community I found
a command that makes the character following the mouse cursor:

GLOBAL SCRIPT

repeatedly_execute_always
Code: ags
{
 character[0].x=mouse.x+10;
}


So far so good ...

But when the cursor moves to the left of the screen it just out of alignment with the character.
And the misalignment is even worse when I move the cursor to the right of the screen.  :-\

Spoiler
[close]
*http://s24.postimg.org/a12njku4l/tela2.png

What I would ask is that someone help me with a command to that cursor and character keep up aligned.
The ideal would be to limit the display ends, forcing mouse cursor to stop as if there were an invisible wall
(Maybe using the EDGE function ?).

Spoiler
[close]
*http://s16.postimg.org/lly1egvit/tela3.png

Here is a link to download the AGS file with the problem:

[--- http://www.filedropper.com/dusko ---]

In AGS file the size of the game is 320x240,
but in fact the original size is 800x600.

Thanks!  :-D

SMF spam blocked by CleanTalk