Page 1 of 1

How do you teleport from one activation region to another?

PostPosted: Mon Apr 30, 2012 9:39 pm
by Goomba
How do you teleport from one activation region to another? would you use the moveto function or what? :?

Re: How do you teleport from one activation region to anothe

PostPosted: Mon Apr 30, 2012 9:47 pm
by skydereign
The MoveTo function moves an actor to a position with a given speed. Moving to different areas in your game is done by moving the view actor. In the case of activation regions, to have the region activate, all you need to do is have the view enter it. Unless you want to move to the region slowly, I don't suggest using MoveTo.
Code: Select all
view.x = 1000;
view.y = 1000;
// this code moves the view to point (1000, 1000)

Re: How do you teleport from one activation region to anothe

PostPosted: Mon Apr 30, 2012 9:48 pm
by Goomba
ok thank you this will be a big help in one of my bigger projects :D, wait, how do i know that the beginning of the region is 1000, 1000 (in your example)? and... will that move the character too? or will i have to write separate code for that? :?