Force actor to keep weapon?
Some of you may notice very similar circumstances between this thread and another thread I wrote, but this is slightly different. In the old thread the Lua was in mission routines, in this one the Lua is tied to an actor.
I want to force an actor to hold a certain item it comes with. So, I tried using a similar technique compared to the solution used in the old thread to make it work, however, it didn't.
Here's what I put in Update(self):
Code:
if self:GetController():IsState(Controller.WEAPON_PICKUP) then
self:GetController():SetState(Controller.WEAPON_PICKUP, false);
end
if self:GetController():IsState(Controller.WEAPON_DROP) then
self:GetController():SetState(Controller.WEAPON_DROP, false);
end
The actor could still pick up and drop any weapon as it pleased. What's wrong?