Scripting ideas/methods.

Started by unixfreak, April 09, 2012, 09:54:03 PM

Previous topic - Next topic

unixfreak

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:
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.

:robotnikfly:
Join the Red Eclipse discord! https://www.redeclipse.net/discord

unixfreak

Join the Red Eclipse discord! https://www.redeclipse.net/discord

unixfreak

Damn it, still can't figure this out.

Does anyone have experience making SP maps in sauerbraten?
I've been looking at Redon's SP map ('lost') and trying to figure out how the door opens on the craft after a delay... it seems it uses the "trigger" command to switch the state of the mapmodel (open/closed).

Though, doesn't seem to be a way to do this in RE, as far as i can tell the trigger command doesn't exist, and quin stated that you cannot control the state of a mapmodel from within a script. He also mentioned about linking two trigger entities, although i can't get that to work (invalid operation, failed to link, etc). Haven't had a reply about that question yet on the Re forums.

So many ideas i can put into a wicked map if i figure this thing out.

Feel like i'm getting impatient/awkward.
Either way, the more people who read this, more chance someone will be able to tell me what i'm doing wrong i guess.

Probably gunna write-up a thread on quadropolis next.  ??? lol.
Join the Red Eclipse discord! https://www.redeclipse.net/discord

Zoocata

Ask Boognish. He's a big RE mapper. Pr0

Boognish

I do not know how to do this, although I've wondered it myself.

A better place to ask would probably be the official RE forums.

http://forum.freegamedev.net/viewforum.php?f=53

unixfreak

Was just online editing a random newmap with MaxPayne >DooM<, we were playign about with triggers and they mentioneda  command "exectrigger"

This is it!

You can open doors within scripts using
exectrigger 1 etc

Just like the "trigger" command in sauer, but renamed. Gunna have fun with this  :anisan:
Join the Red Eclipse discord! https://www.redeclipse.net/discord

Suicizer

You miss shit like trigger1state =
  • ?