How do you teleport from one activation region to another?

Non-platform specific questions.

How do you teleport from one activation region to another?

Postby Goomba » Mon Apr 30, 2012 9:39 pm

How do you teleport from one activation region to another? would you use the moveto function or what? :?
Batman can't be killed - setosorcerer
he can only be neutered... - ASFJerome
User avatar
Goomba
 
Posts: 220
Joined: Wed Apr 25, 2012 2:55 am
Location: Beyond time and space...
Score: 7 Give a positive score

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

Postby skydereign » Mon Apr 30, 2012 9:47 pm

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)
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

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

Postby Goomba » Mon Apr 30, 2012 9:48 pm

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? :?
Batman can't be killed - setosorcerer
he can only be neutered... - ASFJerome
User avatar
Goomba
 
Posts: 220
Joined: Wed Apr 25, 2012 2:55 am
Location: Beyond time and space...
Score: 7 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest