View unanswered posts | View active topics It is currently Sun Dec 29, 2024 6:24 am



Reply to topic  [ 8 posts ] 
 Gib when Clicked. 
Author Message
User avatar

Joined: Mon Mar 07, 2011 2:18 am
Posts: 717
Reply with quote
Post Gib when Clicked.
I need a script for an actor and I need it to gib the actor when ou click. It's an unarmed crab that I need to gib if that make a difference.


Tue May 17, 2011 12:59 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Gib when Clicked.
function Update(self)
if self:GetController():IsState(Controller.PRIMARY_ACTION) == true then
self:GibThis()
end
end

Give that a try.


Tue May 17, 2011 1:07 am
Profile
User avatar

Joined: Mon Mar 07, 2011 2:18 am
Posts: 717
Reply with quote
Post Re: Gib when Clicked.
Nice. Thanks a ton!


Tue May 17, 2011 1:12 am
Profile
User avatar

Joined: Sat Feb 26, 2011 10:29 am
Posts: 163
Reply with quote
Post Re: Gib when Clicked.
or:
if UInputMan:MouseButtonPressed/MouseButtonHeld/MouseButtonReleased() then
else
end

--0 is left button, 1 is right, and 2 is middle.


Tue May 17, 2011 5:54 am
Profile
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Gib when Clicked.
Actually that's a pretty bad way of doing it, considering it won't work for gamepads or keyboard users.


Tue May 17, 2011 10:40 am
Profile
User avatar

Joined: Sat Feb 26, 2011 10:29 am
Posts: 163
Reply with quote
Post Re: Gib when Clicked.
Lizardheim wrote:
Actually that's a pretty bad way of doing it, considering it won't work for gamepads or keyboard users.


Ah, get it.


Tue May 17, 2011 4:15 pm
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Gib when Clicked.
Although, to be fair, he did specifically say "click".


Wed May 18, 2011 4:18 am
Profile
User avatar

Joined: Mon Mar 07, 2011 2:18 am
Posts: 717
Reply with quote
Post Re: Gib when Clicked.
Well yes, in otherwords shoot it.


Wed May 18, 2011 1:16 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 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.075s | 15 Queries | GZIP : Off ]