Posted By
|
Message
|
Robbbiedoo79
Registered 16/05/2003
Points 2
|
11th December, 2005 at 08:05:25 -
example: In frame 1 you start at right of screen and have 2 doors up ahead. You enter one door and it brings you to frame 2.
Is there a way to go back to frame 1 but have charater positioned in front of the door?
n/a
|
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
|
12th December, 2005 at 05:25:02 -
You could use one of the many data storing objects to save that x\y coordinates for later. Eg using the ini object:
(In frame 1)
Player leaves screen on right > Set value ("position","x") to player.x
> Set value ("position","y") to player.y
> Jump to frame 2
Start of frame set player.x to getvalue("position","x") of ini
set player.y to getvalue("position","y") of ini
(Frame 2)
Press any key, jump to frame 1
None of that is real code it's just the general pseudo styled code. For more information on inis search TDC. And here is an article which is useful:
http://create-games.com/article.asp?id=188
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
|
Robbbiedoo79
Registered 16/05/2003
Points 2
|
13th December, 2005 at 17:10:11 -
thanks. I'll give that a try. I've also tried the save game object feature and tried using flags to set positions. Do you think the ini object is the best way to go?
n/a
|
axel Crazy?
Registered 05/02/2005
Points 4766
|
13th December, 2005 at 17:17:02 -
I'd rather use global values or an array. It's easier to use and you won't waste disk space (Even if it the filesize would be minimal), and actually you can "hack" INIs while playing the game to jump to different areas. Also INIs are slightly slower than global values, depending on the computer.
n/a
|
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
|
13th December, 2005 at 17:44:59 -
Actually he's absolutely correct, Inis would work but global values would be much easier.
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
|
Flava
Registered 30/07/2002
Points 684
|
15th December, 2005 at 01:41:42 -
Just do:
+ Start of frame
+ global value A different to 0
+ global value B different to 0
- Set X position to global value A
- Set Y position to global value B
Then on frame two, when character enters door set value A to X position you want character to be in on frame one, and value B to Y position. If the co-ordinates are (0,0) then the character will basically start whereever you have put him/her on the screen (because after the title screen, all global values are 0 by default).
This is a signature. Have this one on me.
|
|
|