Portal Linking to another Map

Talk about making games.

Portal Linking to another Map

Postby ShingingDB » Sun Apr 22, 2007 1:23 am

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?
ShingingDB
 
Posts: 43
Joined: Sun Apr 01, 2007 1:31 am
Score: 0 Give a positive score

Postby Sgt. Sparky » Sun Apr 22, 2007 2:15 am

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby ShingingDB » Thu Apr 26, 2007 12:06 am

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.
ShingingDB
 
Posts: 43
Joined: Sun Apr 01, 2007 1:31 am
Score: 0 Give a positive score

easy fix

Postby d-soldier » Thu Apr 26, 2007 12:31 am

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)
Attachments
helpout1.jpg
Last edited by d-soldier on Thu Apr 26, 2007 12:40 am, edited 1 time in total.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Sgt. Sparky » Thu Apr 26, 2007 12:39 am

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!
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

wow

Postby d-soldier » Thu Apr 26, 2007 12:42 am

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:
Last edited by d-soldier on Thu Apr 26, 2007 1:14 am, edited 1 time in total.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Sgt. Sparky » Thu Apr 26, 2007 12:51 am

can you send me the link? :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Thu Apr 26, 2007 3:16 pm

The most simple way that came in my mind was this:
key down -> script editor -> if collision with portal -> transport
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Thu Apr 26, 2007 10:34 pm

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron