Data Realms Fan Forums
http://45.55.195.193/

Getting the zombie generator to work Lua-free
http://45.55.195.193/viewtopic.php?f=1&t=12984
Page 1 of 1

Author:  Shadow Addict [ Wed Dec 10, 2008 5:47 am ]
Post subject:  Getting the zombie generator to work Lua-free

I managed to get the generator to continously emit by using a small Lua script:

Code:
generator = CreateAEmitter("Zombie Generator")
generator.Pos = Vector(500, 100)
generator:EnableEmission(true)
MovableMan:AddParticle(generator)


I know this isn't any great achievement, and I assume it's been done before, but I was wondering if there was any way to mod the ini itself to make the generator usable. Using 'dofile "generatortest.lua"' is okay, but it's impractical as I'd like to be able to place the generator wherever I want without having to use generator.Pos.

Author:  Lord Tim [ Wed Dec 10, 2008 6:13 am ]
Post subject:  Re: Getting the zombie generator to work Lua-free

Do you want them pre-placed in the scene?

That is where the scene.ini and such files come in. Lua was introduced to Cortex Command relatively late in it's development, and most of the actual code is not in .lua files. Look at how the scene files are set up in Base.rte or Missions.rte.

Author:  Manbearpig [ Wed Dec 10, 2008 6:23 am ]
Post subject:  Re: Getting the zombie generator to work Lua-free

Shadow Addict wrote:
I managed to get the generator to continously emit by using a small Lua script:
I know this isn't any great achievement, and I assume it's been done before, but I was wondering if there was any way to mod the ini itself to make the generator usable. Using 'dofile "generatortest.lua"' is okay, but it's impractical as I'd like to be able to place the generator wherever I want without having to use generator.Pos.


Yes but where actually it is needed to place?
Into scene ini.?

Author:  Shadow Addict [ Wed Dec 10, 2008 11:45 pm ]
Post subject:  Re: Getting the zombie generator to work Lua-free

No, I figured out how to preplace them in scenes without Lua. The thing is I'd like to be able place the generator in the scene in the beginning and then have it already activated, so I could place it wherever and use it. If there's a way to do this by modding the ini, that would be best, but if there was even just a Lua command that I could use to activate an already-placed generator, that would work too.

Sorry if that was hard to understand.

Author:  Lord Tim [ Thu Dec 11, 2008 2:38 am ]
Post subject:  Re: Getting the zombie generator to work Lua-free

There should be a line in the AEmitter code:

Code:
EmissionEnabled = 0


Set that to 1, or add it if it isn't already there.

Author:  Shadow Addict [ Fri Dec 12, 2008 2:34 am ]
Post subject:  Re: Getting the zombie generator to work Lua-free

Thanks!

Author:  deathbal101 [ Mon Dec 22, 2008 6:52 pm ]
Post subject:  Re: Getting the zombie generator to work Lua-free

i dont get it.

Author:  Lord Tim [ Mon Dec 22, 2008 7:56 pm ]
Post subject:  Re: Getting the zombie generator to work Lua-free

What about it don't you get?

Author:  deathbal101 [ Tue Dec 23, 2008 1:57 am ]
Post subject:  Re: Getting the zombie generator to work Lua-free

what do i place and where do i place it?

Author:  Thoughtprocess [ Tue Dec 23, 2008 5:01 am ]
Post subject:  Re: Getting the zombie generator to work Lua-free

@deathbal:
Open up Missions.rte/Items.ini. The zombie generator code starts at line 275. Go down until you see an empty space (the end of the zombie generator code). Put
Code:
EmissionEnabled = 1
on the end of the code.

Alternately, put this on the end to make it a separate entity (so as to not screw up the mission, etc.):
Code:
AddActor = AEmitter
   CopyOf = Zombie Generator
   PresetName = Working Zombie Generator
   Description =  A clone production system turned into a zombie making machine.
   EmissionEnabled = 1


*The description is optional

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/