Data Realms Fan Forums http://45.55.195.193/ |
|
Setting status? http://45.55.195.193/viewtopic.php?f=73&t=15013 |
Page 1 of 1 |
Author: | Siric [ Thu May 28, 2009 2:04 am ] |
Post subject: | Setting status? |
Actor Lua Documentation wrote: Status
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? |
Author: | Grif [ Thu May 28, 2009 2:40 am ] |
Post subject: | Re: Setting status? |
for actor in MovableMan.Actors do actor.Status = 2; end Should work. |
Author: | Siric [ Thu May 28, 2009 2:50 am ] |
Post subject: | 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? |
Author: | Grif [ Thu May 28, 2009 2:56 am ] |
Post subject: | Re: Setting status? |
Well try a different status check to see if that's the problem. |
Author: | Siric [ Thu May 28, 2009 3:37 am ] |
Post subject: | Re: Setting status? |
Huh, I tried the Dead status and nothing happened, so it must be the code. |
Author: | Daman [ Thu May 28, 2009 3:39 am ] |
Post subject: | 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. |
Author: | Siric [ Thu May 28, 2009 3:43 am ] |
Post subject: | 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? |
Author: | Duh102 [ Thu May 28, 2009 4:04 am ] |
Post subject: | Re: Setting status? |
You could pin him. I believe you can just do Code: actor.PinStrength = 10000; |
Author: | Darlos9D [ Thu May 28, 2009 4:22 am ] |
Post subject: | 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. |
Author: | mail2345 [ Thu May 28, 2009 5:34 am ] |
Post subject: | 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. |
Author: | Darlos9D [ Thu May 28, 2009 6:24 am ] |
Post subject: | 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. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |