View unanswered posts | View active topics It is currently Fri Apr 26, 2024 9:10 am



Reply to topic  [ 7 posts ] 
 Gold Generating Actor 
Author Message
User avatar

Joined: Wed Sep 02, 2009 1:45 am
Posts: 40
Location: Houston, TX
Reply with quote
Post 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!


Mon Sep 07, 2009 11:08 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Gold Generating Actor
function Update(self)
local funds = ActivityMan:GetActivity():GetFundsOfTeam(self.Team);
ActivityMan:GetActivity():SetFundsOfTeam(self.Team,funds + 1);
end


Mon Sep 07, 2009 11:25 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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.


Mon Sep 07, 2009 11:31 pm
Profile
User avatar

Joined: Wed Sep 02, 2009 1:45 am
Posts: 40
Location: Houston, TX
Reply with quote
Post 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?


Mon Sep 07, 2009 11:54 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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 190 times


Tue Sep 08, 2009 12:01 am
Profile
User avatar

Joined: Wed Sep 02, 2009 1:45 am
Posts: 40
Location: Houston, TX
Reply with quote
Post 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?


Tue Sep 08, 2009 12:05 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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.


Tue Sep 08, 2009 12:09 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.317s | 16 Queries | GZIP : Off ]