Author |
Message |
Shadow Addict
Joined: Sat Dec 06, 2008 5:58 am Posts: 10
|
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.
|
Wed Dec 10, 2008 5:47 am |
|
|
Lord Tim
Joined: Fri Apr 27, 2007 4:55 pm Posts: 1178 Location: America!
|
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.
|
Wed Dec 10, 2008 6:13 am |
|
|
Manbearpig
Joined: Sun Aug 03, 2008 4:08 pm Posts: 102 Location: Finland Winland!
|
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.?
|
Wed Dec 10, 2008 6:23 am |
|
|
Shadow Addict
Joined: Sat Dec 06, 2008 5:58 am Posts: 10
|
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.
|
Wed Dec 10, 2008 11:45 pm |
|
|
Lord Tim
Joined: Fri Apr 27, 2007 4:55 pm Posts: 1178 Location: America!
|
Re: Getting the zombie generator to work Lua-free
There should be a line in the AEmitter code: Set that to 1, or add it if it isn't already there.
|
Thu Dec 11, 2008 2:38 am |
|
|
Shadow Addict
Joined: Sat Dec 06, 2008 5:58 am Posts: 10
|
Re: Getting the zombie generator to work Lua-free
Thanks!
|
Fri Dec 12, 2008 2:34 am |
|
|
deathbal101
Joined: Sat Dec 13, 2008 11:56 pm Posts: 206
|
Re: Getting the zombie generator to work Lua-free
i dont get it.
|
Mon Dec 22, 2008 6:52 pm |
|
|
Lord Tim
Joined: Fri Apr 27, 2007 4:55 pm Posts: 1178 Location: America!
|
Re: Getting the zombie generator to work Lua-free
What about it don't you get?
|
Mon Dec 22, 2008 7:56 pm |
|
|
deathbal101
Joined: Sat Dec 13, 2008 11:56 pm Posts: 206
|
Re: Getting the zombie generator to work Lua-free
what do i place and where do i place it?
|
Tue Dec 23, 2008 1:57 am |
|
|
Thoughtprocess
Joined: Mon Feb 11, 2008 3:42 pm Posts: 259
|
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 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
|
Tue Dec 23, 2008 5:01 am |
|
|
|