Forum

> > CS2D > Scripts > Teleporting Players with Trigger_If
Forums overviewCS2D overview Scripts overviewLog in to reply

English Teleporting Players with Trigger_If

1 reply
To the start Previous 1 Next To the start

moved Teleporting Players with Trigger_If

Archers24
User Off Offline

Quote
Hey guys! I was just asking how to teleport players using the trigger, Trigger_If. I will use the trigger to make an elevator and this is elevator plan:

Trigger_Use > Trigger_If (with teleport script)

If you know how to do this, please let me know. Thanks!

old Re: Teleporting Players with Trigger_If

DC
Admin Off Offline

Quote
This is either a maps section or a scripts section topic but no general section topic. Moved.

We had a thread like that in the German section recently. Here are the problems:

× cs2d entity trigger_if is designed to be used for simple conditions / evaluations. It's not designed to run complex Lua scripts or scripts which actually do something. That's why it is called trigger_if and not trigger_lua or whatever. That's also why the text box is so small.

× cs2d entity trigger_if doesn't know who used the cs2d entity trigger_use! That's a big problem because we need that info!

√ Solution:
Forget cs2d entity trigger_if. You should write a Lua map script instead and use appropriate hooks. In this case cs2d lua hook usebutton. A Lua map script is simply a script which is placed into the maps folder and has the same name as the map but a .lua extension instead of a .map extension. It is automatically executed on the server when the map is loaded.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview