|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 8 posts ] |
|
Author |
Message |
Emogotsaone
Joined: Mon Mar 07, 2011 2:18 am Posts: 717
|
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 |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
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 |
|
|
Emogotsaone
Joined: Mon Mar 07, 2011 2:18 am Posts: 717
|
Re: Gib when Clicked.
Nice. Thanks a ton!
|
Tue May 17, 2011 1:12 am |
|
|
Xery
Joined: Sat Feb 26, 2011 10:29 am Posts: 163
|
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 |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
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 |
|
|
Xery
Joined: Sat Feb 26, 2011 10:29 am Posts: 163
|
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 |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
Re: Gib when Clicked.
Although, to be fair, he did specifically say "click".
|
Wed May 18, 2011 4:18 am |
|
|
Emogotsaone
Joined: Mon Mar 07, 2011 2:18 am Posts: 717
|
Re: Gib when Clicked.
Well yes, in otherwords shoot it.
|
Wed May 18, 2011 1:16 pm |
|
|
|
|
Page 1 of 1
|
[ 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
|
|