AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [TF2] How to match teleporters? (https://forums.alliedmods.net/showthread.php?t=245901)

luki1412 08-08-2014 11:47

[TF2] How to match teleporters?
 
I know how to create 2 teleporters, but they don't work, because they are not matched together.
I couldn't find any information on this topic using search.

Also, in Hammer, there is a value called "matchingTeleporter" for teleporters, but I don't know how to use it properly.

Any ideas?

Dr. Greg House 08-08-2014 12:27

Re: [TF2] How to match teleporters?
 
https://developer.valvesoftware.com/wiki/Obj_teleporter

I assume you can (besides setting the type) entangle them by setting them to the same builder.

The keyvalue "matchingTeleporter" probably specifies the (target)name of the matching teleporter.

luki1412 08-08-2014 12:55

Re: [TF2] How to match teleporters?
 
Quote:

Originally Posted by Dr. Greg House (Post 2181083)
https://developer.valvesoftware.com/wiki/Obj_teleporter

I assume you can (besides setting the type) entangle them by setting them to the same builder.

The keyvalue "matchingTeleporter" probably specifies the (target)name of the matching teleporter.

Setting them to the same builder just allows them to pick them up and you can see their name but teleporters are not working.

I thought about this:
PHP Code:

        if(GetEntProp(teleporterProp_Send"m_iObjectMode")==0) {     //entrance
        
DispatchKeyValue(teleporter"targetname", <something>)    ;
        
DispatchKeyValue(teleporter"matchingTeleporter", <something2>)    ;
        }
        else if(
GetEntProp(teleporterProp_Send"m_iObjectMode")==1) {     //exit
        
DispatchKeyValue(teleporter"targetname", <something2>)    ;
        
DispatchKeyValue(teleporter"matchingTeleporter", <something>)    ;
        } 

but it doesn't work, or I'm doing something wrong.

Godis 08-08-2014 12:58

Re: [TF2] How to match teleporters?
 
1 is for entrance, 2 is for exit.

luki1412 08-08-2014 13:00

Re: [TF2] How to match teleporters?
 
Quote:

Originally Posted by Godis (Post 2181094)
1 is for entrance, 2 is for exit.

Are you sure?
PHP Code:

enum TFObjectMode
{
    
TFObjectMode_None 0,
    
TFObjectMode_Entrance 0,
    
TFObjectMode_Exit 1
}; 


Pelipoika 08-08-2014 13:02

Re: [TF2] How to match teleporters?
 
IMO the matchingTeleporter propably refers to the matching teleporters targetname

EDIT: Hurr Durr

Dr. Greg House 08-08-2014 13:56

Re: [TF2] How to match teleporters?
 
I'm having dejavu. :P

WildCard65 08-09-2014 11:30

Re: [TF2] How to match teleporters?
 
I remember finding this SDK function called FindMatch

luki1412 08-10-2014 08:33

Re: [TF2] How to match teleporters?
 
Looks like nobody knows. Just guessing.

Dr. Greg House 08-10-2014 09:19

Re: [TF2] How to match teleporters?
 
Kaitou Kid, you check for the object mode settings of the teleporters, you don't seem to set it anywhere.


All times are GMT -4. The time now is 23:33.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.