View unanswered posts | View active topics It is currently Thu Dec 26, 2024 5:39 pm



Reply to topic  [ 11 posts ] 
 Setting status? 
Author Message
User avatar

Joined: Wed Oct 25, 2006 7:57 pm
Posts: 240
Location: Out there, among the stars.
Reply with quote
Post Setting status?
Actor Lua Documentation wrote:
Status

  • 0 = STABLE
  • 1 = UNSTABLE
  • 2 = INACTIVE
  • 3 = DYING
  • 4 = DEAD

I had a great idea concerning robots in a certain field being Uncontrollable and unable to move, I'm assuming that Inactive status would Achieve part of this (Unable to move), but I don't know how to set it.

So, how do I set the Status of an actor?


Thu May 28, 2009 2:04 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Setting status?
for actor in MovableMan.Actors do
actor.Status = 2;
end

Should work.


Thu May 28, 2009 2:40 am
Profile
User avatar

Joined: Wed Oct 25, 2006 7:57 pm
Posts: 240
Location: Out there, among the stars.
Reply with quote
Post Re: Setting status?
Hmm, Either the Inactive setting does nothing or the code isn't working, I'm voting on the former.
Is there any other way to completely incapacitate an actor?


Thu May 28, 2009 2:50 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Setting status?
Well try a different status check to see if that's the problem.


Thu May 28, 2009 2:56 am
Profile
User avatar

Joined: Wed Oct 25, 2006 7:57 pm
Posts: 240
Location: Out there, among the stars.
Reply with quote
Post Re: Setting status?
Huh, I tried the Dead status and nothing happened, so it must be the code.


Thu May 28, 2009 3:37 am
Profile
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post Re: Setting status?
Is it returning an error? If not, it's not the code.

It could just be that the game doesn't care what the status is set to via Lua.


Thu May 28, 2009 3:39 am
Profile
User avatar

Joined: Wed Oct 25, 2006 7:57 pm
Posts: 240
Location: Out there, among the stars.
Reply with quote
Post Re: Setting status?
Daman wrote:
Is it returning an error? If not, it's not the code.

It could just be that the game doesn't care what the status is set to via Lua.

Ah, I don't see any Error in the console, So you are right.

Is there any other way to incapacitate an actor?


Thu May 28, 2009 3:43 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Setting status?
You could pin him.
I believe you can just do
Code:
actor.PinStrength = 10000;


Thu May 28, 2009 4:04 am
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Re: Setting status?
Duh102 wrote:
You could pin him.
I believe you can just do
Code:
actor.PinStrength = 10000;

But then they can still fire.

For my EMP grenade, I just used SetControllerMode(Controller.CIM_DISABLED), an Actor function. Just keep calling that on actors in the Update code for as long as you want. As soon as you stop calling it, they'll go back to normal, so it's pretty simple to use.


Thu May 28, 2009 4:22 am
Profile YIM
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Setting status?
Tip:
CIM_NETWORK works much better than CIM_DISABLED, as for some reason disabled units still turn to the direction they get shot in.


Thu May 28, 2009 5:34 am
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Re: Setting status?
Well, I also made it so they flip out and constantly look in random directions, so that's not quite so noticeable.

Never tried the network setting though.


Thu May 28, 2009 6:24 am
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 11 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.088s | 14 Queries | GZIP : Off ]