KillObject() CommandArmedAnimatedBuilding possible? [Solved]
Moderator: Moderators
- Dasher
- Private Third Class
- Posts: 49
- Joined: Fri Aug 04, 2017 1:46 pm
- Projects :: Loronar Jade Moon
- xbox live or psn: No gamertag set
KillObject() CommandArmedAnimatedBuilding possible? [Solved]
As the title implies I tried to kill an object labeled "CommandArmedAnimatedBuilding" via LUA command KillObject(), but without success. I've also tried SetProperty to set CurHealth=0 but did't succeed either. All these commands worked when I labeled the object "ArmedBuilding", the problem is I need it to be "CommandArmedAnimatedBuilding" for the weapon animation to work when the object is killed, since this isn't the case as long as the object is an "ArmedBuilding". Any ideas? Help is greatly appreciated.
Last edited by Dasher on Mon Sep 18, 2017 7:04 am, edited 2 times in total.
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: KillObject() on CommandArmedAnimatedBuilding possible?
What do you mean when you say you "labeled" these objects? Are you talking about the ClassLabel in their associated ODF? If so, that's not what you need to reference in the Lua script; instead, you need to reference the object's unique name that's set in Zero Editor.
References:
https://github.com/marth8880/SWBF2-Lua- ... clua#L1443
References:
https://github.com/marth8880/SWBF2-Lua- ... clua#L1443
- Dasher
- Private Third Class
- Posts: 49
- Joined: Fri Aug 04, 2017 1:46 pm
- Projects :: Loronar Jade Moon
- xbox live or psn: No gamertag set
Re: KillObject() on CommandArmedAnimatedBuilding possible?
I know, this is how I set up my LUA
It only kills the object when I change the ClassLabel to "ArmedBuilding", but then the weapon effect that is displayed when the shield's turning off doesn't work
Hidden/Spoiler:
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: KillObject() on CommandArmedAnimatedBuilding possible?
The CommandArmedAnimatedBuilding class might be broken. Why do you need to use it? What are you trying to do with it?
Related resources:
http://www.secretsociety.com/forum/down ... meters.txt
http://www.secretsociety.com/forum/down ... erence.jpg
http://www.secretsociety.com/forum/down ... erence.jpg
Related resources:
http://www.secretsociety.com/forum/down ... meters.txt
http://www.secretsociety.com/forum/down ... erence.jpg
http://www.secretsociety.com/forum/down ... erence.jpg
- Dasher
- Private Third Class
- Posts: 49
- Joined: Fri Aug 04, 2017 1:46 pm
- Projects :: Loronar Jade Moon
- xbox live or psn: No gamertag set
Re: KillObject() on CommandArmedAnimatedBuilding possible?
I'm trying to set up a shield that is switched on/off depending on the team controlling a certain CP. The problem is that the turn on animation/effect works fine, but when the object is killed via player or LUA (provided it's class label is "ArmedBuilding") there is no turn off animation/effect, the shield simply disappears, the object is still on the map though with it's current health on 0.
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: KillObject() on CommandArmedAnimatedBuilding possible?
Oh, you don't need to kill the object to do that, you can just animate it to hide itself with procedural animation.
Resources:
https://sites.google.com/site/swbf2modt ... ation-mode
http://www.gametoast.com/viewtopic.php?f=27&t=5865
http://www.gametoast.com/viewtopic.php?f=27&t=12473
Resources:
https://sites.google.com/site/swbf2modt ... ation-mode
http://www.gametoast.com/viewtopic.php?f=27&t=5865
http://www.gametoast.com/viewtopic.php?f=27&t=12473
- Dasher
- Private Third Class
- Posts: 49
- Joined: Fri Aug 04, 2017 1:46 pm
- Projects :: Loronar Jade Moon
- xbox live or psn: No gamertag set
Re: KillObject() on CommandArmedAnimatedBuilding possible?
The object is simply a cube, which has the "CommandAnimatedArmedBuilding" ClassLabel, it has a weapon which is the fambaa shield, so we're not talking about a solid object type of shield, but about an actual weapon. So in other words it is a fambaa with deployable shield, my bad should of clarified that:
The object ODF:
the weapon ODF:
So again the issue is this:
Class Label: ArmedBuilding | CommandArmedAnimatedBuilding
PlaysEffect: only on turn on | on turn on and turn off
CanBeKilledviaLUA: yes | no
EDIT:
So I finally got it working the "CommandArmedAnimatedBuilding" class isn't broken, it can be killed via KillObject and respawned via CreateEntity
The object ODF:
Hidden/Spoiler:
Hidden/Spoiler:
Class Label: ArmedBuilding | CommandArmedAnimatedBuilding
PlaysEffect: only on turn on | on turn on and turn off
CanBeKilledviaLUA: yes | no
EDIT:
So I finally got it working the "CommandArmedAnimatedBuilding" class isn't broken, it can be killed via KillObject and respawned via CreateEntity