Data Realms Fan Forums
http://45.55.195.193/

Gold Generating Actor
http://45.55.195.193/viewtopic.php?f=75&t=16463
Page 1 of 1

Author:  moocow9000 [ Mon Sep 07, 2009 11:08 pm ]
Post subject:  Gold Generating Actor

Hey there, fellow Cortex Commanders! I was wondering if somebody could make me a buyable actor (buyable like you can buy it from the bodies menu instead of spawning it in skirmish mode) that would generate gold? I have that pack with those Bunker Bits that generates gold, but you can't spawn those in campaign mode.

Thanks Guys!

Author:  Grif [ Mon Sep 07, 2009 11:25 pm ]
Post subject:  Re: Gold Generating Actor

function Update(self)
local funds = ActivityMan:GetActivity():GetFundsOfTeam(self.Team);
ActivityMan:GetActivity():SetFundsOfTeam(self.Team,funds + 1);
end

Author:  Duh102 [ Mon Sep 07, 2009 11:31 pm ]
Post subject:  Re: Gold Generating Actor

What Grif left out:
Copy and paste that script into a .lua file (just make a .txt and rename it after you've edited it), put that script in one of the known .rtes, such as Base.rte, open up the .ini for an actor, add the line
Code:
(tab)ScriptPath = (insert the path of the .lua file here)

The path should look like
Code:
Base.rte/(luafile).lua


Oh, and that (tab) means press the tab key.

Author:  moocow9000 [ Mon Sep 07, 2009 11:54 pm ]
Post subject:  Re: Gold Generating Actor

So, make a new .txt document, paste "function Update(self)
local funds = ActivityMan:GetActivity():GetFundsOfTeam(self.Team);
ActivityMan:GetActivity():SetFundsOfTeam(self.Team,funds + 1);
end" into it, then rename it (whatever).lua then just put it on the bottom of an .ini file for an actor?

Author:  Duh102 [ Tue Sep 08, 2009 12:01 am ]
Post subject:  Re: Gold Generating Actor

Here, I did it for you, but for some reason it's not working. Before I replaced it, GetFundsOfTeam was returning errors, so I looked it up on the wiki and saw it was GetTeamFunds. When I replaced it it stopped throwing errors, but simply did not work. Not sure why.
Attachment:
Gold Coalition.rte.rar [665 Bytes]
Downloaded 205 times

Author:  moocow9000 [ Tue Sep 08, 2009 12:05 am ]
Post subject:  Re: Gold Generating Actor

Thanks, but to be sure, in case I have to do something like this, i just make a .txt file, rename it to (whatever).lua then paste it at the bottom of an actor/weapon/craft/anything?

Author:  Duh102 [ Tue Sep 08, 2009 12:09 am ]
Post subject:  Re: Gold Generating Actor

Yes, paste the .lua file in the folder your actor is in, then in the actors' ini file put the above line.

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