Author |
Message |
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Switch weapons?
Inventory management is ♥♥♥♥, remember? Thought it MIGHT work?
|
Fri Jun 05, 2009 5:12 am |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
Re: Switch weapons?
FGJKADFKLHSD565WGHJCN DAMMIT.
|
Fri Jun 05, 2009 10:10 pm |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
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 |
|
|
Siric
Joined: Wed Oct 25, 2006 7:57 pm Posts: 240 Location: Out there, among the stars.
|
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 |
|
|
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
Re: Switch weapons?
Meh, who cares?
Just a little.. side affect. *wink*
|
Tue Jun 09, 2009 4:41 pm |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
Re: Switch weapons?
Awesome side-effect is awesome.
|
Tue Jun 09, 2009 6:48 pm |
|
|
|