View unanswered posts | View active topics It is currently Tue Jun 18, 2019 10:48 pm



Reply to topic  [ 12 posts ] 
 A script That make all actors'n crafts dies but no brains? 
Author Message
Banned
User avatar

Joined: Fri Dec 09, 2011 10:32 am
Posts: 226
Location: In the datarealms cemetery
Reply with quote
Post A script That make all actors'n crafts dies but no brains?
It's for a TSAR BOMBA mod.
:grin:


Mon Apr 30, 2012 12:58 pm
Profile
User avatar

Joined: Mon Nov 14, 2011 8:58 pm
Posts: 92
Reply with quote
Post Re: A script That make all actors'n crafts dies but no brains?
lucariokiller wrote:
It's for a TSAR BOMBA mod.
:grin:



no offense but that seems stupid as hell...

might as well call it the "actor wipe" bomb, since it has no resemblance to a real tsar bomba.

though I know GetPlayerBrain works for human players, I'm not sure whether it works for AI brains

you could try MovableMan:GetUnassignedBrain


Fri May 11, 2012 2:27 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 961
Reply with quote
Post Re: A script That make all actors'n crafts dies but no brains?
You can use actor:IsInGroup("Brains") to check.


Fri May 11, 2012 2:45 pm
Profile
Banned
User avatar

Joined: Fri Dec 09, 2011 10:32 am
Posts: 226
Location: In the datarealms cemetery
Reply with quote
Post Re: A script That make all actors'n crafts dies but no brains?
No worries trotskygrad,This is really stupid.


Tue May 15, 2012 3:29 pm
Profile
User avatar

Joined: Mon Nov 14, 2011 8:58 pm
Posts: 92
Reply with quote
Post Re: A script That make all actors'n crafts dies but no brains?
actually I would be up for an "actor wipe" device, just don't call it a "tsar bomba"

would be quite useful for the laggy times


Tue May 15, 2012 3:32 pm
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 661
Location: Halifax, Canada
Reply with quote
Post Re: A script That make all actors'n crafts dies but no brains?
This'll gibs all non-brain actors on the map (assuming there're no typos or anything). If you want to specify team or range you have to add a bit more but it's really pretty simple.
Code:
for actor in MovableMan.Actors do
   if not actor:IsInGroup("Brains") then
   --can also be if not actor:HasObjectInGroup("Brains") then since I'm pretty sure hasobjectingroup counts the actor too.
      actor:GibThis();
      --can also be actor.ToDelete = true; if you want the actor to disappear or
      -- actor.Health = 0; if you want the actor to die without gibbing.
   end
end


Tue May 15, 2012 4:19 pm
Profile
Banned
User avatar

Joined: Fri Dec 09, 2011 10:32 am
Posts: 226
Location: In the datarealms cemetery
Reply with quote
Post Re: A script That make all actors'n crafts dies but no brains?
Bad boy,you are now in the credits of my mod!


Tue May 15, 2012 7:23 pm
Profile
User avatar

Joined: Wed May 18, 2011 2:44 am
Posts: 490
Location: Dank dreams.
Reply with quote
Post Re: A script That make all actors'n crafts dies but no brains?
I'd call it the overload bomb because anything that doesn't have the brain power of a brain gibs all over the place.


Tue May 22, 2012 6:24 pm
Profile
Banned
User avatar

Joined: Fri Dec 09, 2011 10:32 am
Posts: 226
Location: In the datarealms cemetery
Reply with quote
Post Re: A script That make all actors'n crafts dies but no brains?
Bad boy,your script don't work.


Thu May 24, 2012 12:55 pm
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 661
Location: Halifax, Canada
Reply with quote
Post Re: A script That make all actors'n crafts dies but no brains?
Yes it does, I just checked by testing it and it works fine. If you don't know how to attack a script to something don't blame me.
More specifically for a bomb you'll want:
Code:
function Create(self)
end
function Update(self)
end
function Destroy(self)
      for actor in MovableMan.Actors do
         if not actor:IsInGroup("Brains") then
         --can also be if not actor:HasObjectInGroup("Brains") then since I'm pretty sure hasobjectingroup counts the actor too.
            actor:GibThis();
            --can also be actor.ToDelete = true; if you want the actor to disappear or
            -- actor.Health = 0; if you want the actor to die without gibbing.
         end
      end
end


Thu May 24, 2012 5:43 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: A script That make all actors'n crafts dies but no brains?
If lucariokiller is unable to use simple Lua then he wouldn't know you had to enclose it in the destroy function.


Thu May 24, 2012 5:47 pm
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 661
Location: Halifax, Canada
Reply with quote
Post Re: A script That make all actors'n crafts dies but no brains?
Yeah, fair enough, I suppose I should have thought about that. Create or update would have done something too so I can only assume he just placed it straight in there. Anyway, problem solved either way I hope.


Thu May 24, 2012 6:14 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 12 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.018s | 15 Queries | GZIP : Off ]