Data Realms Fan Forums http://45.55.195.193/ |
|
How do I make an actor gib into a different actor http://45.55.195.193/viewtopic.php?f=1&t=21983 |
Page 1 of 2 |
Author: | David Rodrigov [ Thu Mar 17, 2011 6:42 pm ] |
Post subject: | How do I make an actor gib into a different actor |
Hey guys, I have two pre-made ACrabs. I want the first one to gib into the other one. How can I do this? |
Author: | Roast Veg [ Thu Mar 17, 2011 6:56 pm ] |
Post subject: | Re: How do I make an actor gib into a different actor |
AddGib = ACrab Then follow the normal format for gibs. |
Author: | David Rodrigov [ Thu Mar 17, 2011 7:12 pm ] |
Post subject: | Re: How do I make an actor gib into a different actor |
I did that, but now I get an error. This is the code I added to the gibs. Code: AddGib = ACrab GibParticle = ACrab CopyOf = iGod Count = 1 And this is the error. "Wrong type in Reader when passed to Serializable::Create() in BattleCrab.rte/Crab/Crab.ini at line 266!". |
Author: | Roast Veg [ Thu Mar 17, 2011 7:17 pm ] |
Post subject: | Re: How do I make an actor gib into a different actor |
Derp. AddGib = Gib, GibParticle = ACrab. |
Author: | dragonxp [ Thu Mar 17, 2011 7:18 pm ] |
Post subject: | Re: How do I make an actor gib into a different actor |
Also iGod has to be defined before you define it as a Gib. |
Author: | David Rodrigov [ Thu Mar 17, 2011 9:36 pm ] |
Post subject: | Re: How do I make an actor gib into a different actor |
It works now, but the gibbed ACrab is on the neutral team. How can I make it on red team? |
Author: | Coops [ Thu Mar 17, 2011 9:51 pm ] |
Post subject: | Re: How do I make an actor gib into a different actor |
Lua is what your looking for then. A simple script that sets the ACrabs team to the closest actors team should do the trick. |
Author: | David Rodrigov [ Thu Mar 17, 2011 9:58 pm ] |
Post subject: | Re: How do I make an actor gib into a different actor |
Can anyone provide me a script? |
Author: | Coops [ Thu Mar 17, 2011 10:26 pm ] |
Post subject: | Re: How do I make an actor gib into a different actor |
Code: function Create(self) [tab]for parent in MovableMan.Actors do [tab][tab]if SceneMan:ShortestDistance(self.Pos,parent.Pos,true).Magnitude < 15 and parent.PresetName == "<actor name>" then [tab][tab][tab]self.parent = ToACrab(parent) [tab][tab][tab]self.Team = self.parent.Team [tab][tab]end [tab]end end Just replace the <actor name> with the actor that Gibs the second one EDIT: Huuuuurrrrrrrr. It wont get the actor's Team if the actor isnt there... Code: function Destroy(self) self.gib = CreateACrab("iGod") self.gib.Pos = self.Pos self.gib.Team = self.Team MovableMan:AddParticle(self.gib) end Attach that to the actor that gibs the second actor and get rid of the GibParticle in the .ini. |
Author: | David Rodrigov [ Thu Mar 17, 2011 11:02 pm ] |
Post subject: | Re: How do I make an actor gib into a different actor |
That script makes iGod a actor on the right team, but for some reason it is not controllable. What is wrong? |
Author: | Coops [ Thu Mar 17, 2011 11:38 pm ] |
Post subject: | Re: How do I make an actor gib into a different actor |
Todays not my day... Sorry, Replace Code: MovableMan:AddParticle with Code: MovableMan:AddActor |
Author: | David Rodrigov [ Fri Mar 18, 2011 4:47 am ] |
Post subject: | Re: How do I make an actor gib into a different actor |
That one works, thanks! |
Author: | Grif [ Fri Mar 18, 2011 5:23 am ] |
Post subject: | Re: How do I make an actor gib into a different actor |
Or, uh, pass it Team = 1 in the .ini gib code. Seriously. AddGib = Gib GibParticle = ACrab CopyOf = iGod Team = 1 |
Author: | Coops [ Fri Mar 18, 2011 6:18 am ] |
Post subject: | Re: How do I make an actor gib into a different actor |
Not entirely Multiplayer friendly though. Id hate to see my actor gib to find out it was a trojan horse. |
Author: | Grif [ Sat Mar 19, 2011 1:44 am ] |
Post subject: | Re: How do I make an actor gib into a different actor |
man who the hell actually plays multiplayer or selects a different team |
Page 1 of 2 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |