Data Realms Fan Forums
http://45.55.195.193/

Gib when Clicked.
http://45.55.195.193/viewtopic.php?f=1&t=23765
Page 1 of 1

Author:  Emogotsaone [ Tue May 17, 2011 12:59 am ]
Post subject:  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.

Author:  Azukki [ Tue May 17, 2011 1:07 am ]
Post subject:  Re: Gib when Clicked.

function Update(self)
if self:GetController():IsState(Controller.PRIMARY_ACTION) == true then
self:GibThis()
end
end

Give that a try.

Author:  Emogotsaone [ Tue May 17, 2011 1:12 am ]
Post subject:  Re: Gib when Clicked.

Nice. Thanks a ton!

Author:  Xery [ Tue May 17, 2011 5:54 am ]
Post subject:  Re: Gib when Clicked.

or:
if UInputMan:MouseButtonPressed/MouseButtonHeld/MouseButtonReleased() then
else
end

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

Author:  Lizardheim [ Tue May 17, 2011 10:40 am ]
Post subject:  Re: Gib when Clicked.

Actually that's a pretty bad way of doing it, considering it won't work for gamepads or keyboard users.

Author:  Xery [ Tue May 17, 2011 4:15 pm ]
Post subject:  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.

Author:  Azukki [ Wed May 18, 2011 4:18 am ]
Post subject:  Re: Gib when Clicked.

Although, to be fair, he did specifically say "click".

Author:  Emogotsaone [ Wed May 18, 2011 1:16 pm ]
Post subject:  Re: Gib when Clicked.

Well yes, in otherwords shoot it.

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