View unanswered posts | View active topics It is currently Wed Jan 08, 2025 10:22 pm



Reply to topic  [ 10 posts ] 
 Getting the zombie generator to work Lua-free 
Author Message

Joined: Sat Dec 06, 2008 5:58 am
Posts: 10
Reply with quote
Post 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
Profile
User avatar

Joined: Fri Apr 27, 2007 4:55 pm
Posts: 1178
Location: America!
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Aug 03, 2008 4:08 pm
Posts: 102
Location: Finland Winland!
Reply with quote
Post 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
Profile

Joined: Sat Dec 06, 2008 5:58 am
Posts: 10
Reply with quote
Post 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
Profile
User avatar

Joined: Fri Apr 27, 2007 4:55 pm
Posts: 1178
Location: America!
Reply with quote
Post 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.


Thu Dec 11, 2008 2:38 am
Profile

Joined: Sat Dec 06, 2008 5:58 am
Posts: 10
Reply with quote
Post Re: Getting the zombie generator to work Lua-free
Thanks!


Fri Dec 12, 2008 2:34 am
Profile
User avatar

Joined: Sat Dec 13, 2008 11:56 pm
Posts: 206
Reply with quote
Post Re: Getting the zombie generator to work Lua-free
i dont get it.


Mon Dec 22, 2008 6:52 pm
Profile
User avatar

Joined: Fri Apr 27, 2007 4:55 pm
Posts: 1178
Location: America!
Reply with quote
Post Re: Getting the zombie generator to work Lua-free
What about it don't you get?


Mon Dec 22, 2008 7:56 pm
Profile
User avatar

Joined: Sat Dec 13, 2008 11:56 pm
Posts: 206
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Feb 11, 2008 3:42 pm
Posts: 259
Reply with quote
Post 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


Tue Dec 23, 2008 5:01 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.026s | 14 Queries | GZIP : Off ]