Page 1 of 1

Portal Linking to another Map

PostPosted: Sun Apr 22, 2007 1:23 am
by ShingingDB
I've been searching on a way to move your view from one map to another.

Your player will press the key up, and it'll transport him to another map. I dont know how to do that. Now to transport him to another map, I was thinking about just moving the view. Instead of making another level.

So how do I make it so that the actor + view will move the another map?

PostPosted: Sun Apr 22, 2007 2:15 am
by Sgt. Sparky
if you want him to load another level I suggest makin' a complete level with everything but with just one of each actor,
that way once you finish it you can easily make more levels :D
to load another level let's say lvl2
just use when you want it to change
Code: Select all
LoadGame("lvl2");

:D
if you are just wanting the view to move to another point in the level make and actor called viewmove and make it a wire frame region,
when you want the view to move to viewmove just use this code for the view,
Code: Select all
x = viewmove.x;
y = viewmove.y;

:D
if you want the view to fallow the player just ask me:D

PostPosted: Thu Apr 26, 2007 12:06 am
by ShingingDB
You're talking about like when you collide to the portal. I'm talking abuot when you're ontop of the portal, and then you press up.

If you say just use Key Down event, then that wont work. Otherwise people could just press Up anywhere and they'll be going to another map.

easy fix

PostPosted: Thu Apr 26, 2007 12:31 am
by d-soldier
I had to do something sililar for my lift(elevator)activations. What you need to do is have a filled region around the transporter. It will have a collision effect that (when the player collides with it) creates a non-drawn actor (call it activate1), and destorys the actor (activate1) upon collision finnish. So, the non-drawn actor (should be a pacman image) only exists when the player is within the filled region.. good so far?
Now, the "activate1" actor and ACTIVATION EVENT (right click on it and use the "add activation event" option, not through the actor control option) which is "key down" (configure the keydown option) and then select the actor you want to activate when prompted. Once a line exists between that actor and "activate1" press ESC.
Next, go to the actor you just attatched the acitvation event to, and (this time in the "actor control option" click ADD / ACTIVATION EVENT / FROM (activate1) / and what you want to happen.
This way the up arrow will only work when your player is standing in the filled region... Let me know if that doesn't all make sense.
POST EDIT: Included a pic to help you visualize (hopefully)

PostPosted: Thu Apr 26, 2007 12:39 am
by Sgt. Sparky
okay,
you do not need all that jazz,
just use this on a repeated collision with the portal,
Code: Select all
char*key=GetKeyState();
if(key[KEY_UP] == 1)
{
     put what you want here;
}

:D
alot simpler!

wow

PostPosted: Thu Apr 26, 2007 12:42 am
by d-soldier
I do things the hard way apparently... And Sparky, you need to be on my posts helping me, I've got two things in the GENERAL SECTION i am waiting for you to help me with! :evil:

PostPosted: Thu Apr 26, 2007 12:51 am
by Sgt. Sparky
can you send me the link? :D

PostPosted: Thu Apr 26, 2007 3:16 pm
by Troodon
The most simple way that came in my mind was this:
key down -> script editor -> if collision with portal -> transport

PostPosted: Thu Apr 26, 2007 10:34 pm
by Sgt. Sparky
Code: Select all
char*key=GetKeyState();
if(key[KEY_UP] == 1)
{
     put what you want here;
}

is alot easier,
that way you just have to add one event,
the collision event repeated. :D