View unanswered posts | View active topics It is currently Mon Dec 30, 2024 10:24 pm



Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
 How do I make an actor gib into a different actor 
Author Message
User avatar

Joined: Mon Jan 25, 2010 11:35 pm
Posts: 675
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Jan 25, 2010 11:35 pm
Posts: 675
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: How do I make an actor gib into a different actor
Derp. AddGib = Gib, GibParticle = ACrab.


Thu Mar 17, 2011 7:17 pm
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Jan 25, 2010 11:35 pm
Posts: 675
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Jan 25, 2010 11:35 pm
Posts: 675
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post 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.


Thu Mar 17, 2011 10:26 pm
Profile
User avatar

Joined: Mon Jan 25, 2010 11:35 pm
Posts: 675
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post 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


Thu Mar 17, 2011 11:38 pm
Profile
User avatar

Joined: Mon Jan 25, 2010 11:35 pm
Posts: 675
Reply with quote
Post Re: How do I make an actor gib into a different actor
That one works, thanks!


Fri Mar 18, 2011 4:47 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post 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
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ]  Go to page 1, 2  Next

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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.075s | 13 Queries | GZIP : Off ]