Data Realms Fan Forums http://45.55.195.193/ |
|
Problem setting actor team http://45.55.195.193/viewtopic.php?f=73&t=19579 |
Page 1 of 1 |
Author: | salt_1219 [ Sun Aug 22, 2010 8:56 am ] |
Post subject: | Problem setting actor team |
So here's my problem. I made a TDExplosive, that gibs a AEmitter, that emits a actor (spiderbot). When the actor comes into play it is team-less and, set to brain hunt me. I've tried everything to get it to set the team to mine via ini, so now I'm going with Lua. Problem is my crappy code isn't working. Code: function Create(self) SpiderBot.Team = Self.Team; -- set team to player team end Its short and simple but it should work, what am I doing wrong here? Side note: I've also tried Self.Team = Self.Team and Self.Team = 1 and Function Update(self) Any help is much appreciated! |
Author: | TheLastBanana [ Sun Aug 22, 2010 9:05 am ] |
Post subject: | Re: Problem setting actor team |
What is this code placed in? SpiderBot doesn't seem to be defined anywhere. As well, "self" should never be capitalized. |
Author: | salt_1219 [ Sun Aug 22, 2010 9:25 am ] |
Post subject: | Re: Problem setting actor team |
Hmmm that could account for some of my problems. The code is placed on the actor. Should it be on the emitter? Okay I fix the capitalization problem and, replaced spiderbot with self. Still nothing. I've uploaded my file, mind you this is SUPER rough. Really only a proof of concept at the moment. Actor can be bought from the bomb menu. (Ignore the gun its not finished yet either) |
Author: | Grif [ Sun Aug 22, 2010 4:55 pm ] |
Post subject: | Re: Problem setting actor team |
If you wanna fix this pure-ini just use an ABomb; that is, an instantly-gibbing ACDropship with no attachments that contains the spiderbot. It'll be on one team and not be a rogue brainhunter like most spawned clones are. You will need to force teams on the dropship, though. For fixing it with Lua, what you should do is just use Lua to spawn the actor entirely, rather than try to change the team after spawning it. That way you can define the actor, set the team, and then spawn it. |
Author: | salt_1219 [ Sun Aug 22, 2010 7:54 pm ] |
Post subject: | Re: Problem setting actor team |
Thanks, I think I will try the dropship method you mentioned. What do you mean by "force teams on the dropship"? can't I just set it in the ini under Team =.... or will that just create another rouge brain hunter. |
Author: | Grif [ Sun Aug 22, 2010 7:57 pm ] |
Post subject: | Re: Problem setting actor team |
Well, you can do that, and it will still function properly, but it won't be the same team as the actor if the player happens to be on the green team. |
Author: | salt_1219 [ Sun Aug 22, 2010 9:04 pm ] |
Post subject: | Re: Problem setting actor team |
I think I can live with that. *update* I ran into a problem using the craft method. The craft wont let me set it to bombs tab. Ignore that I figured out how to do this using the grenade method without adding AEmitter that emits a actor. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |