Can you turn a trigger_teleport on and off?

Can you turn a trigger_teleport on and off?

Re: Can you turn a trigger_teleport on and off? Posted by [RDC]Twitch on Thu May 12th 2011 at 7:43pm
[RDC]Twitch
99 posts
Posted 2011-05-12 7:43pm
99 posts 1085 snarkmarks Registered: Jun 6th 2009 Location: USA
Can you turn a trigger_teleport on and off? I was hoping you could activate the trigger_teleport with a button and then it turns off after a quick delay. Is this possible?
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: Can you turn a trigger_teleport on and off? Posted by Crono on Thu May 12th 2011 at 7:56pm
Crono
6628 posts
Posted 2011-05-12 7:56pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Might want to look at this
http://developer.valvesoftware.com/wiki/Info_teleporter_countdown

And in the trigger entity events, there's a disable/enable flag. So, you can enable it and disable it remotely (from a timer entity).

Just mess with it, I guess ... there's four entities related to teleports.

http://developer.valvesoftware.com/wiki/List_of_entities
Blame it on Microsoft, God does.
Re: Can you turn a trigger_teleport on and off? Posted by Degenatron on Thu May 12th 2011 at 8:12pm
Degenatron
64 posts
Posted 2011-05-12 8:12pm
64 posts 1336 snarkmarks Registered: Dec 7th 2004 Occupation: IT Professional Location: USA
Absolutely. Use a multisource.

The button triggers the multimanager that targets a multisource. The Trigger_teleprt has the multisource listed as its master, so the teleport only works as long as the multisource is on.

The multimanager calls the multisource twice, the first entry turns the multisource on, the second entry turns the multisource back off. Set the values for each multisource call to set the time the teleporter is active.

You can also use the same multimanager to turn on effects like a teleport sound and sprite and then turn them back off.

D-Gen
Re: Can you turn a trigger_teleport on and off? Posted by Degenatron on Thu May 12th 2011 at 8:13pm
Degenatron
64 posts
Posted 2011-05-12 8:13pm
64 posts 1336 snarkmarks Registered: Dec 7th 2004 Occupation: IT Professional Location: USA
Crono said:
Might want to look at this
http://developer.valvesoftware.com/wiki/Info_teleporter_countdown

And in the trigger entity events, there's a disable/enable flag. So, you can enable it and disable it remotely (from a timer entity).

Just mess with it, I guess ... there's four entities related to teleports.

http://developer.valvesoftware.com/wiki/List_of_entities
That's for Source editing, not Gold Source.

D-Gen
Re: Can you turn a trigger_teleport on and off? Posted by Crono on Thu May 12th 2011 at 8:22pm
Crono
6628 posts
Posted 2011-05-12 8:22pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
I didn't even notice. It was just under new posts >_>
Blame it on Microsoft, God does.
Re: Can you turn a trigger_teleport on and off? Posted by [RDC]Twitch on Thu May 12th 2011 at 8:44pm
[RDC]Twitch
99 posts
Posted 2011-05-12 8:44pm
99 posts 1085 snarkmarks Registered: Jun 6th 2009 Location: USA
Perfect! Thanks :)
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: Can you turn a trigger_teleport on and off? Posted by [RDC]Twitch on Thu May 12th 2011 at 8:47pm
[RDC]Twitch
99 posts
Posted 2011-05-12 8:47pm
99 posts 1085 snarkmarks Registered: Jun 6th 2009 Location: USA
One more question fellas. For the multi source, do I put the teleport name as the target or the "Global State Master" ?
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: Can you turn a trigger_teleport on and off? Posted by [RDC]Twitch on Thu May 12th 2011 at 9:58pm
[RDC]Twitch
99 posts
Posted 2011-05-12 9:58pm
99 posts 1085 snarkmarks Registered: Jun 6th 2009 Location: USA
One more thing needed in order for it to work. You have to have an env_global. You need the env_global to control the multisource
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: Can you turn a trigger_teleport on and off? Posted by Degenatron on Fri May 13th 2011 at 12:16pm
Degenatron
64 posts
Posted 2011-05-13 12:16pm
64 posts 1336 snarkmarks Registered: Dec 7th 2004 Occupation: IT Professional Location: USA
Twitch said:
One more question fellas. For the multi source, do I put the teleport name as the target or the "Global State Master" ?
No. Global State Master should be blank for the multisource. Put the name of the multisource in the "Master" field on the trigger_teleport.
Twitch said:
One more thing needed in order for it to work. You have to have an env_global. You need the env_global to control the multisource
Hmmm. Env_global is for passing settings from one level to the next. It allows the game to remember trigger states inbetween level transitions. You SHOULDN'T need one, but on the other hand, if it's working for you, I say go for it.

D-Gen
Re: Can you turn a trigger_teleport on and off? Posted by [RDC]Twitch on Fri May 13th 2011 at 3:47pm
[RDC]Twitch
99 posts
Posted 2011-05-13 3:47pm
99 posts 1085 snarkmarks Registered: Jun 6th 2009 Location: USA
Here is what I did that works every time so far. I need to do more testing. I used a multisource, multi_manager, trigger_teleport, and env_global. Use whatever you want to trigger the whole process. I chose a button for my purposes. You would need something like a func_button to target the multi_manager in order to turn the teleport (via env_global) on and off. I hope this makes sense. I am new to the more complicated entity stuff and to most goldsrc mappers, this idea is probably extremely simple, lol. I still don't understand it completely!

trigger_teleport
name = tele
master = telsource

env_global
Name = telglobal
Global state to set = tele
Trigger mode = toggle
Initial state = off
Tick flag for 'set initial state'

multisource
Name = telsource
Target = blank (nothing)
Global State Master = tele

multi_manager
name = tele_mm
telglobal .001
telglobal#1 1

Use a func_button targeting tele_mm (multi_manager). The multimanager targets the env_global (telglobal) once to turn it on and again to turn it off.
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: Can you turn a trigger_teleport on and off? Posted by Degenatron on Mon May 16th 2011 at 1:43pm
Degenatron
64 posts
Posted 2011-05-16 1:43pm
64 posts 1336 snarkmarks Registered: Dec 7th 2004 Occupation: IT Professional Location: USA
[RDC said:
Twitch]Here is what I did that works every time so far. I need to do more testing. I used a multisource, multi_manager, trigger_teleport, and env_global. Use whatever you want to trigger the whole process. I chose a button for my purposes. You would need something like a func_button to target the multi_manager in order to turn the teleport (via env_global) on and off. I hope this makes sense. I am new to the more complicated entity stuff and to most goldsrc mappers, this idea is probably extremely simple, lol. I still don't understand it completely!

trigger_teleport
name = tele
master = telsource

env_global
Name = telglobal
Global state to set = tele
Trigger mode = toggle
Initial state = off
Tick flag for 'set initial state'

multisource
Name = telsource
Target = blank (nothing)
Global State Master = tele

multi_manager
name = tele_mm
telglobal .001
telglobal#1 1

Use a func_button targeting tele_mm (multi_manager). The multimanager targets the env_global (telglobal) once to turn it on and again to turn it off.
Yep, I see what you are doing there. A couple of things to remember are:
a multisource starts in an "off" position already
a trigger can target a multisource directly with a "toggle"
Try this:
Make a copy of your map
On the test copy - Delete the env_global
set the tele_mm to target "telsource" instead of "telglobal"
and remove the Global State Master from "telsource"
It should operate exactly the same.

The reason why goes back to "best preactices". If you continue to build devices like this, with an unneeded additional entity, you may find yourself running up against the entity limit when working on large, complicated maps.

On the other hand, you've got it working the way you want and there is no problem with continuing on with the map. Just file this advice away for the next time.

D-Gen
Re: Can you turn a trigger_teleport on and off? Posted by [RDC]Twitch on Mon May 16th 2011 at 5:22pm
[RDC]Twitch
99 posts
Posted 2011-05-16 5:22pm
99 posts 1085 snarkmarks Registered: Jun 6th 2009 Location: USA
I'm all about best practice and doing things efficiently! Thanks for the hel. I will test this later tonight and I'm better you are right. And yeah, my entity list is right on the edge of too much :) Anything helps.
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: Can you turn a trigger_teleport on and off? Posted by [RDC]Twitch on Mon May 16th 2011 at 9:50pm
[RDC]Twitch
99 posts
Posted 2011-05-16 9:50pm
99 posts 1085 snarkmarks Registered: Jun 6th 2009 Location: USA
Thanks again for the advice. Works like a champ!
web
Half-Life, Half-Life 2, and Q3 engine mapping