View unanswered posts | View active topics It is currently Mon Jan 13, 2025 9:52 am



Reply to topic  [ 5 posts ] 
 Need to make actor unable to pick up or drop weapons 
Author Message
User avatar

Joined: Fri Dec 28, 2007 4:19 am
Posts: 1119
Reply with quote
Post 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?


Wed Mar 17, 2010 6:15 pm
Profile
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post 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.


Wed Mar 17, 2010 6:52 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post 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.


Thu Mar 18, 2010 12:26 am
Profile
User avatar

Joined: Fri Dec 28, 2007 4:19 am
Posts: 1119
Reply with quote
Post 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.


Thu Mar 18, 2010 3:23 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post 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.


Thu Mar 18, 2010 11:35 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.030s | 15 Queries | GZIP : Off ]