Author |
Message |
David Rodrigov
Joined: Mon Jan 25, 2010 11:35 pm Posts: 675
|
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?
|
Thu Mar 17, 2011 6:42 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: How do I make an actor gib into a different actor
AddGib = ACrab
Then follow the normal format for gibs.
|
Thu Mar 17, 2011 6:56 pm |
|
|
David Rodrigov
Joined: Mon Jan 25, 2010 11:35 pm Posts: 675
|
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!".
|
Thu Mar 17, 2011 7:12 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: How do I make an actor gib into a different actor
Derp. AddGib = Gib, GibParticle = ACrab.
|
Thu Mar 17, 2011 7:17 pm |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
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.
|
Thu Mar 17, 2011 7:18 pm |
|
|
David Rodrigov
Joined: Mon Jan 25, 2010 11:35 pm Posts: 675
|
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?
|
Thu Mar 17, 2011 9:36 pm |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
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.
|
Thu Mar 17, 2011 9:51 pm |
|
|
David Rodrigov
Joined: Mon Jan 25, 2010 11:35 pm Posts: 675
|
Re: How do I make an actor gib into a different actor
Can anyone provide me a script?
|
Thu Mar 17, 2011 9:58 pm |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
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 oneEDIT: 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.
|
Thu Mar 17, 2011 10:26 pm |
|
|
David Rodrigov
Joined: Mon Jan 25, 2010 11:35 pm Posts: 675
|
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?
|
Thu Mar 17, 2011 11:02 pm |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
Re: How do I make an actor gib into a different actor
Todays not my day... Sorry, Replace Code: MovableMan:AddParticle with
|
Thu Mar 17, 2011 11:38 pm |
|
|
David Rodrigov
Joined: Mon Jan 25, 2010 11:35 pm Posts: 675
|
Re: How do I make an actor gib into a different actor
That one works, thanks!
|
Fri Mar 18, 2011 4:47 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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
|
Fri Mar 18, 2011 5:23 am |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
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.
|
Fri Mar 18, 2011 6:18 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: How do I make an actor gib into a different actor
man who the hell actually plays multiplayer or selects a different team
|
Sat Mar 19, 2011 1:44 am |
|
|
|