Page 1 of 1

Writing functions for the fake consoles code Console

Posted: Mon Aug 01, 2011 3:52 pm
by baumerindustries
In the fake Console is a code Console included, which allows you to run lua functions during the game.
How can I make functions for this Console? I'd like to turn all shields of the crusiers off.

Re: writeing functions for the fake consoles code Console

Posted: Mon Aug 01, 2011 3:58 pm
by DarthD.U.C.K.
you can write any luacode into the codeconsole. you have to search for the names of the cruisershields (if they are sepearte object) and "kill" them. if they are applied to the cruisers through odf or lua, you have to set the maxshield to zero with the setproperty-command. you can find a list of luacommands in the scriptingsystemguide in the documentationfolder nd the name of the shieldssomewhere in ze or the spaceluas.

Re: writeing functions for the fake consoles code Console

Posted: Mon Aug 01, 2011 4:00 pm
by baumerindustries
which function kills objects? And is it possible to change the location of an existing object and if Yes, how?

Re: writeing functions for the fake consoles code Console

Posted: Mon Aug 01, 2011 4:22 pm
by Bob
the lua command to kill an objekt is

Code: Select all

KillObject("OBJECTNAME")
to bring it back use

Code: Select all

RespawnObject("OBJECTNAME") 
(replace OBJECTNAME with the name of your object)

To move things you could animate them in ZE and play the animation with

Code: Select all

PlayAnimation("ANIMGROUPNAME")
(replace ANIMGROUPNAME with... you know what)
Play can be replaced with Pause and Rewind.

for useful lua codes check the documentation and
http://www.gametoast.com/forums/viewtop ... 3&p=440919