Case not closed, I'd sure like to know what the problem was before/what you changed.Tourny wrote:case closed.
Force Fields
Moderator: Moderators
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Force Fields
- Tourny
- Command Sergeant Major

- Posts: 289
- Joined: Sat Sep 27, 2008 5:58 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Crifton
- Contact:
Re: Force Fields
I'm not sue what it was exactly. It was probably the names. I took your tutorial as something to go on and then pieced together my own version from the scripting guide:
OnObjectKill(function(object, killer) if GetEntityName(object) == "panel" then KillObject("forcefield") end end)
OnObjectRepair(function(object, repairer) if GetEntityName(object) == "panel" then RespawnObject("forcefield") end end)
I don't really see the difference except that I couldn't find the "PlayAnimation" Command in the guide. So instead I rigged it to kill.
OnObjectKill(function(object, killer) if GetEntityName(object) == "panel" then KillObject("forcefield") end end)
OnObjectRepair(function(object, repairer) if GetEntityName(object) == "panel" then RespawnObject("forcefield") end end)
I don't really see the difference except that I couldn't find the "PlayAnimation" Command in the guide. So instead I rigged it to kill.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Force Fields
That works too, but it verifies that the problem was with the animation. I can't tell, but there was probably something wrong with the setup. And the animation .lua guide (what little of it there is) is at the end of the animation doc in the BF2_modtools documentation.
- Tourny
- Command Sergeant Major

- Posts: 289
- Joined: Sat Sep 27, 2008 5:58 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Crifton
- Contact:
Re: Force Fields
Um... Am I supposed to say something else now?
