View unanswered posts | View active topics It is currently Fri Apr 26, 2024 8:53 am



Reply to topic  [ 11 posts ] 
 Switch weapons? 
Author Message
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post Switch weapons?
Is it possible to make it so that if you press "1" you have a certain weapon, and if you press "2" you have a different one?


Fri Jun 05, 2009 4:51 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Switch weapons?
Inventory management is ♥♥♥♥, remember? Thought it MIGHT work?


Fri Jun 05, 2009 5:12 am
Profile
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post Re: Switch weapons?
Wait... what?

So this won't work?

Code:
function Update(self)
   if(UInputMan:KeyPressed(28)) and (self:IsPlayerControlled()) then
      Pressed1 = 1
   else
      Pressed1 = 0
   end
   if Pressed1 == 1 then
      self.CreateHDFirearm("Annihilator");
   else
      Pressed1 = nil;
   end
   if(UInputMan:KeyPressed(29)) and (self:IsPlayerControlled()) then
      Pressed2 = 1
   else
      Pressed2 = 0
   end
   if Pressed2 == 1 then
      self.CreateHDFirearm("QMG");
   else
      Pressed2 = nil;
   end
end


Is it possible then to switch out the turrets on an ACrab to give the effect that it changed weapons?


Fri Jun 05, 2009 5:14 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Switch weapons?
Well just doing createhdfirearm isn't going to do anything at all; you have to switch out the turrets which would require attachable and/or inventory access, which is as of b23 straight up ♥♥♥♥.

So no you can't do it.


Fri Jun 05, 2009 5:37 am
Profile
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post Re: Switch weapons?
Wait... But maybe... Could you replace every instance of a gun with a different one? So like you press 1 and SMGs turn into Pistols.


Fri Jun 05, 2009 7:52 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Switch weapons?
Can't access guns while they're held; they're treated as attachables and ignored completely by Lua.


Fri Jun 05, 2009 10:07 pm
Profile
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post Re: Switch weapons?
FGJKADFKLHSD565WGHJCN DAMMIT.


Fri Jun 05, 2009 10:10 pm
Profile
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Switch weapons?
You COULD however replace the actor with one that has a different weapon, don't know if it works tho.


Tue Jun 09, 2009 2:39 pm
Profile
User avatar

Joined: Wed Oct 25, 2006 7:57 pm
Posts: 240
Location: Out there, among the stars.
Reply with quote
Post Re: Switch weapons?
Lizard wrote:
You COULD however replace the actor with one that has a different weapon, don't know if it works tho.

then, if it is damaged it will go back to full health/all attachables back/no wounds anymore.


Tue Jun 09, 2009 3:32 pm
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Switch weapons?
Meh, who cares?

Just a little.. side affect.
*wink*


Tue Jun 09, 2009 4:41 pm
Profile WWW
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Switch weapons?
Awesome side-effect is awesome.


Tue Jun 09, 2009 6:48 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.080s | 15 Queries | GZIP : Off ]