Hey, i realise this is the "archived" forum but it's letting me start new threads, so should i be posting this here or not?
Anyway..... is anyone familar with scripting in red eclipse? It seems to differ a bit from sauerbraten in several ways (commands used for example). Most fo the basic stuff such as opening doors can be done entirely in game without touching the config using trigger entities and linking them together.
So far i've got my head around linking a trigger entity with the "action,toggle,on" parameter:
trigger > sound + door
So when you press a button on the wall, a noise is heard and the door opens, blah blah. All works good.
I've been trying to get it to use the "script,toggle,on" paramater, so that i can echo some text when a button is pressed, for example a notification fo which door has been opened, in the event the door is on the other side of the map as an example.
I picked up somewhere that you can use "worldalias on_trigger_86" to run a command/loop (where obviously, the trigger entity would be named trigger(86) in this example.
Like so:
Although it doesn't do anything when you press E inside of the trigger radius.
Another problem i've now got, is that when i find out how to echo text on a trigger event, the door would not open anymore. Anyone also know how to open a door with a command?
Sorry if this sounds confusing, there isn't alot of wiki/docs on this stuff that i can find.
What i am trying to do, is have a console with a trigger in front... you press the button and there is a set time/delay for how long the door stays open, and you have to speed your way into the door before it closes. Obviously if there is a command to open/close doors in scripts/configs then it would be easy enough to just add a sleep loop.
Anyway..... is anyone familar with scripting in red eclipse? It seems to differ a bit from sauerbraten in several ways (commands used for example). Most fo the basic stuff such as opening doors can be done entirely in game without touching the config using trigger entities and linking them together.
So far i've got my head around linking a trigger entity with the "action,toggle,on" parameter:
trigger > sound + door
So when you press a button on the wall, a noise is heard and the door opens, blah blah. All works good.
I've been trying to get it to use the "script,toggle,on" paramater, so that i can echo some text when a button is pressed, for example a notification fo which door has been opened, in the event the door is on the other side of the map as an example.
I picked up somewhere that you can use "worldalias on_trigger_86" to run a command/loop (where obviously, the trigger entity would be named trigger(86) in this example.
Like so:
Code Select
worldalias on_trigger_86 = [= echo "^fz43!^f7ALERT^fz43! ^f4room ^f6A^f02 ^f4has been opened." ]
Although it doesn't do anything when you press E inside of the trigger radius.
Another problem i've now got, is that when i find out how to echo text on a trigger event, the door would not open anymore. Anyone also know how to open a door with a command?
Sorry if this sounds confusing, there isn't alot of wiki/docs on this stuff that i can find.
What i am trying to do, is have a console with a trigger in front... you press the button and there is a set time/delay for how long the door stays open, and you have to speed your way into the door before it closes. Obviously if there is a command to open/close doors in scripts/configs then it would be easy enough to just add a sleep loop.