How do I make a teleporter?

Get technical support about the C++ source code and about Lua scripts for maps, entities, GUIs, the console, materials, etc. Also covered are the Cafu libraries and APIs, as well as compiling, linking, and the build system.
Post Reply
User avatar
bigjj13
Posts:68
Joined:2010-04-04, 19:16
Location:Germany
Contact:
How do I make a teleporter?

Post by bigjj13 » 2010-04-26, 14:54

Hi,

In my game I need some teleporters:

1. they should be aktivated by a GUI.
2. you should be able to chose the destination teleporter with that GUI.

Example:

You chose Teleporter 5 and get teleported there. There you deside to ge to Teleporter 23 ...

Is it possible to make something like that?
When yes what should I edit?

Thanks BigJJ
BigJJ -- SG-O
Image
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: How do I make a teleporter?

Post by Carsten » 2010-04-26, 21:31

Dear BigJJ,

your question is a good one! ;)
Please give me one or two more days to come up with a proper answer - I'll at least augment one of the existing example maps with a functioning teleporter that can serve as an example, then write down all essential steps. :builder:
Best regards,
Carsten
User avatar
bigjj13
Posts:68
Joined:2010-04-04, 19:16
Location:Germany
Contact:

Re: How do I make a teleporter?

Post by bigjj13 » 2010-04-27, 15:33

Hi,

Thank you very much for that fast answer. :thanks:

BigJJ
BigJJ -- SG-O
Image
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: How do I make a teleporter?

Post by Carsten » 2010-04-30, 19:07

Just a quick update: I'm working on this! ;)

It's not yet ready though, and I'll have little time over the weekend, but I'll have a complete example map and improved documentation for you in the course of the next week.

What slowed me down is the fact that I found a series of minor but subtle problems along that way, and I wanted to take the time to fix them all, see http://trac.cafu.de/timeline for details.
Best regards,
Carsten
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: How do I make a teleporter?

Post by Carsten » 2010-05-05, 21:50

Dear BigJJ,

I finally have a reply for you: :cheesy:

A new CaWE tutorial: Creating Teleporter Stations

It's not yet polished and there is not much eye candy involved, but it's a nice and simple start for more sophisticated teleportation results.

Please note that you must get the latest source code for this to work: At least r68 is required. You can download it as usual at http://www.cafu.de/downloads or get it from SVN head.
The latest source code not only contains the required basic enhancements for the teleporters to work, it also includes all example files mentioned in the tutorial.

I'll update the binary Worlds.zip file and the binary development release with a ready-made, fully working example later, but you don't need those if you work with the latest source code anyways.
Best regards,
Carsten
User avatar
bigjj13
Posts:68
Joined:2010-04-04, 19:16
Location:Germany
Contact:

Re: How do I make a teleporter?

Post by bigjj13 » 2010-05-09, 14:28

HI,

thanks a lot! :cheesy:

that was a great help!

bigJJ
BigJJ -- SG-O
Image
User avatar
bigjj13
Posts:68
Joined:2010-04-04, 19:16
Location:Germany
Contact:

Re: How do I make a teleporter?

Post by bigjj13 » 2010-08-02, 20:39

Hi,

i thnink, there is something wrong with the teleporter code,

if i make a map with a teleporter and a door, the teleporter dont work.

Here are the maps:
with door
sgo_door.zip
(12.07KiB)Downloaded 273 times
and without door
sgo_nodoor.zip
(10.45KiB)Downloaded 280 times
BigJJ -- SG-O
Image
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: How do I make a teleporter?

Post by Carsten » 2010-08-04, 10:41

Hi BigJJ,
bigjj13 wrote:if i make a map with a teleporter and a door, the teleporter dont work.
are there any error messages in the in-game console?
Best regards,
Carsten
User avatar
bigjj13
Posts:68
Joined:2010-04-04, 19:16
Location:Germany
Contact:

Re: How do I make a teleporter?

Post by bigjj13 » 2010-08-04, 11:53

Hi

no, there are no error mesages in the ingame console.

Thanks
BigJJ -- SG-O
Image
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: How do I make a teleporter?

Post by Carsten » 2010-08-04, 22:42

Ok, I just had a look into your maps.

I think the problem is because the info_generic entities in the map with the door are named like "info_generic_001" when it should be "info_generic_1" (without the leading zeros), because this is what function teleport in the map script expects.

You can fix the problem either by renaming the info_generic entities in the map, or by fixing the map script to look for three-digit named info_generic entities.
Best regards,
Carsten
User avatar
bigjj13
Posts:68
Joined:2010-04-04, 19:16
Location:Germany
Contact:

Re: How do I make a teleporter?

Post by bigjj13 » 2010-08-05, 19:17

HI,

Now it works fine, thanks :D
BigJJ -- SG-O
Image
Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests