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.

AppGameKit Classic Chat / [SOLVED] Offset return to begin

Author
Message
Rocco Sette
6
Years of Service
User Offline
Joined: 2nd Aug 2017
Location:
Posted: 15th Oct 2018 20:44
Good evening !

I wanted to test something.

I can change my offset perfectly, but if X is superior to a value VALUE, i wanted to show the begin of the map.

If my view is superior to a value, i want show offset X 0 JUST NEXT TO X VALUE + 1, and fall in a loop like that.

Like the ancient view in google maps, when you can go to right of left without limit.

Thank's

The author of this post has marked a post as an answer.

Go to answer

Rocco Sette
6
Years of Service
User Offline
Joined: 2nd Aug 2017
Location:
Posted: 16th Oct 2018 17:29
Up ?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 16th Oct 2018 17:45
This post has been marked by the post author as the answer.
Im a little confused as to what you mean

do you mean you want to be able to have a never ending map?

if that's the case you need a mapset like
ABCDEFGHIJ[KLM]NOPQRSTUVWXYZ

where [] indicates you current view of tiles for example

you then move the map not the player

so for example if one of the tiles is less than a certain amount then place it to the right like ABC is below

DEFGHIJKLM[NOP]QRSTUVWXYZABC

Something like this
fubar
Rocco Sette
6
Years of Service
User Offline
Joined: 2nd Aug 2017
Location:
Posted: 16th Oct 2018 18:06
Exactly ! Very nice ! Thank's !

And on the same way, you know how to make a rectangle and hive sprite over this rectangle ?

If i make a rectangle i can move offset in and move it. Part of sprites outside is hidden.
Rocco Sette
6
Years of Service
User Offline
Joined: 2nd Aug 2017
Location:
Posted: 16th Oct 2018 18:11
And more, i use SetViewOffset, and your method is uncompatible with that.

Have you an idea with setviewoffset ?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 16th Oct 2018 18:55 Edited at: 16th Oct 2018 18:58
I have a level editor with full source available That uses setviewset that should demonstrate how to do so
https://forum.thegamecreators.com/thread/219932
fubar

Login to post a reply

Server time is: 2024-04-19 19:30:14
Your offset time is: 2024-04-19 19:30:14