Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Problem with moving sprites

Author
Message
Frederik79
7
Years of Service
User Offline
Joined: 28th Dec 2016
Location:
Posted: 28th Dec 2016 08:53
Hi, I´m trying to creat a game and I´m completly new to this.
I´m want my Sprites to move one or two steps to fixed "points" next to it.
Like on a chessboard a pawn can only move one or two steps (first move).
I have look for 3 days to find anything on this but i haven´t found anything.
Any help is useful thanks.

Frederik
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Dec 2016 09:44
Welcome

You need SetSpritePosition() or SetSpritePositionByOffset()
You do not "move" sprites, you simply specify the new position.
If you want the chess piece to travel between the 2 points, then you need to repeatedly position the Sprite until it reaches its destination.
You can also use the Tween commands to help you move the sprite with intermediate points.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-11-21 22:12:43
Your offset time is: 2024-11-21 22:12:43