Data Realms Fan Forums
http://45.55.195.193/

Need to make actor unable to pick up or drop weapons
http://45.55.195.193/viewtopic.php?f=73&t=18150
Page 1 of 1

Author:  DSMK2 [ Wed Mar 17, 2010 6:15 pm ]
Post subject:  Need to make actor unable to pick up or drop weapons

Code:
--Can't Pickup Stuff
   if self:GetController():IsState(Controller.WEAPON_PICKUP) then
      self:GetController():SetState(Controller.WEAPON_PICKUP,false);
   --Can't Drop Stuff
   elseif self:GetController():IsState(Controller.WEAPON_DROP) then
      self:GetController():SetState(Controller.WEAPON_DROP,false);
   end


I can't get it to work, my actor still is able to pick up and drop weapons, any help please?

Author:  Lizardheim [ Wed Mar 17, 2010 6:52 pm ]
Post subject:  Re: Need to make actor unable to pick up or drop weapons

Dropped weapons just dissapear and get put back in inventory, picked up weapons get automaticly dropped.

Author:  CaveCricket48 [ Thu Mar 18, 2010 12:26 am ]
Post subject:  Re: Need to make actor unable to pick up or drop weapons

Get rid of the "if" and "elseif" statements but leave the control-disabling parts. Right now it will only effect the actor right after it picked up/dropped something, which is pointless if the actor just did it.

Author:  DSMK2 [ Thu Mar 18, 2010 3:23 am ]
Post subject:  Re: Need to make actor unable to pick up or drop weapons

Like this?

Code:
--Can't Pickup Stuff
   self:GetController():SetState(Controller.WEAPON_PICKUP,false);
   --Can't Drop Stuff
   self:GetController():SetState(Controller.WEAPON_DROP,false);


Doesn't seem to work as well.

Author:  CaveCricket48 [ Thu Mar 18, 2010 11:35 am ]
Post subject:  Re: Need to make actor unable to pick up or drop weapons

Is it in the Update function? Attached to the actor? Otherwise I'm not sure.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/