Some updated info here. Some of the scripting reference examples may be of use to people who know what they're doing, although it really needs an introduction into how you do scripting on a per-room basis for everyone else.

Feel free to request anything and everything and I'll make a note of it above.

I would still like to know if it's possible to make switches affect anything other than bollards and water.

You can detect their state in lua, so there should be quite a lot you can do with them. The Save Huey adventure (OK, I know you can't get it right now, but it's on its way any day!) is designed to show lua being used to include functionality beyond that in the main game. It's only simple, but there's an added bonus system where you can pick up hidden 'power spheres'. It's all done with named dummy dynamic objects and a lua collision detection routine + writing out data to the saves.

Is there possibility of scripting sound effects? I'm polishing what I have.

You can launch sounds and effects that are shipped with the game using script - that covers most of what's left for me to add in the script reference actually other than stuff that affects ghost hacking. I'll need to compile a list of the paths to all the sfx/fx you can use though.

Zharmad wrote:

Also, can I affect the number of lives and current health of the player?

Yes - again, I need to document some more of this, but I'll also need Mark to go through the code and compile a list of items. The command is pretty simple and it's one line to give the player something, but you need to know what the items are else you'll be stuck. Energon for instance started life as an 'extend' pickup, so is called 'EXTEND'. There's various ways to inflict damage too, but I'm not as experienced as Mark with them which is why they aren't in the docs yet - I need to do some research myself!

One easy command you can do is restore the player's health using:

Code:

restorePlayer()

Crussh wrote:

is there any way to make it so that a switch changes the direction of a conveyor belt?

Actually - that's something I wanted too! but there's currently no default way of doing it. At some point I want to test swapping or rotating the objects, which might make it possible, but I'm not sure how the game will react, if say the player is on top of it at the time.

*bump*
Updated the docs again - further additions to the scripting command reference, bollard tutorial, scripting introductory page that explains how room scripts are set up and how the two required functions operate within a room.

Should you mention putting the invisiblock on the bollards for the intersection thing?

Some of the chat images are repeated.

BTW with getWorldDir() couldn't someone put a .wav file in there adventure dir and then play it with a lua script? I was able to play wave files with the scripts if I put the wave file in the mrrobot program directory. Would including a wave file cause problems with the adventure downloader?
Can you control the game music from the script in any way?

One thing I think would be interesting to know is what file format the model_override parameter on some dynamic objects takes. Could I create my own custom decals if I knew how to make the proper model file?

Hmm. How do you get the wav file to play with scripts? THe program just crashes whenever I call
loadSFX( "data/sounds/*anything*.wav", 0.9, false, false ).. Maybe I have to load the sound files zipped up in MrRobot.000?

I'm also looking for a way to convert energon collected back into health and lives.

Hmm. How do you get the wav file to play with scripts? THe program just crashes whenever I call
loadSFX( "data/sounds/*anything*.wav", 0.9, false, false ).. Maybe I have to load the sound files zipped up in MrRobot.000?

My bad! I got part of the documentation backwards - the last boolean sets the wav as fixed if true, and relative to the owner if false. So if you set it to false you need to include an owner.