Page 1 of 1

saving

PostPosted: Fri Dec 08, 2006 9:31 pm
by Zehper48
If i made a button inside my game and if you click on it, it saves the x and y corrdinates and a health number, what would be the code for that, and how do you find the x and y corrdinates in the game?

PostPosted: Sat Dec 09, 2006 7:26 am
by Troodon
Well...getting coordinates is pretty easy. Make a text actor "xactor" and write in it's draw actor -> script editor:

xactor.textNumber = youractor.x

Then make another text actor "yactor" and write:

yactor.textNumber = youractor.y

Then just make how you want the text actors to display in key down event.
You can use for example: create actor, change transparency, change z depth, etc etc. One which fits with your game.

PostPosted: Sun Dec 10, 2006 6:39 pm
by Zehper48
thanks man it works!

PostPosted: Mon Dec 11, 2006 7:13 pm
by Troodon
No problem. :)