# weapon(s) duplicates when switching weapons

**URL:** <https://blenderartists.org/t/weapon-s-duplicates-when-switching-weapons/559938>\
**Category:** Game Engine Support and Discussion\
**Created:** [December 19, 2012, 10:37am UTC](https://blenderartists.org/t/weapon-s-duplicates-when-switching-weapons/559938 "2012-12-19T10:37:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cotaks](https://blenderartists.org/user_avatar/blenderartists.org/cotaks/32/21677_2.png) [@Cotaks](https://blenderartists.org/u/Cotaks)\
**Post date:** [December 19, 2012, 10:37am UTC](https://blenderartists.org/t/weapon-s-duplicates-when-switching-weapons/559938/1 "2012-12-19T10:37:20Z")

</div>

Hello,

I made a weapon pickup/switch thing. (no python)  
It works great but there is a problem that i dont know how to solve.

How it works:  
Got 4 weapons on the floor, who i can pickup (works)  
When pickup weapon,it selects the one picked up last (works)  
When weapons are picked up, key 1-4 selects the weapon (works)

So all good u think?  
Not at all, when i have all weapons (or only 2 of the weapons) and then  
pressing 1-4 keys at the same time, i get more weapons in my hand then that i can carry lol.

just smashing on 1 key at a time does nothing, but when i got a weapon at key 1 and 2 and  
press them i get both weapons in my hand.

My question, how can i solve this?

The blend:  
[http://www.pasteall.org/blend/18248](http://www.pasteall.org/blend/18248)

Ps: whats up with this forum? why cant i use enter or quotes or anything else when i want to post a message?  
its a bit of a pain,now i need to use notepad for it xD

---

<div class="post-metadata">

**Author:** ![Downdate](https://blenderartists.org/user_avatar/blenderartists.org/downdate/32/24224_2.png) [@Downdate](https://blenderartists.org/u/Downdate)\
**Post date:** [December 19, 2012, 1:04pm UTC](https://blenderartists.org/t/weapon-s-duplicates-when-switching-weapons/559938/2 "2012-12-19T13:04:46Z")

</div>

Enable java here.

---

<div class="post-metadata">

**Author:** ![deranjer](https://blenderartists.org/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@deranjer](https://blenderartists.org/u/deranjer)\
**Post date:** [December 19, 2012, 3:43pm UTC](https://blenderartists.org/t/weapon-s-duplicates-when-switching-weapons/559938/3 "2012-12-19T15:43:56Z")

</div>

Hmm, not sure, but have you tried putting the weapon switches into different states? That might solve the issue as you could do a slight delay before going back to a previous state? Thats all I can think of for now 😃

---

<div class="post-metadata">

**Author:** ![Cotaks](https://blenderartists.org/user_avatar/blenderartists.org/cotaks/32/21677_2.png) [@Cotaks](https://blenderartists.org/u/Cotaks)\
**Post date:** [December 20, 2012, 8:03am UTC](https://blenderartists.org/t/weapon-s-duplicates-when-switching-weapons/559938/4 "2012-12-20T08:03:34Z")

</div>

> [@deranjer](#):
>
> Hmm, not sure, but have you tried putting the weapon switches into different states? That might solve the issue as you could do a slight delay before going back to a previous state? Thats all I can think of for now 😃

Oh yeah, that could solve the problem, didnt even think about that xD, will try this out in the weekend.  
@downdate, its not the java, its on. maybe its IE 10 who blocks it, but still verry strange, it only happends on this forum, all the other forums are acting normal.

---

<div class="post-metadata">

**Author:** ![Cotaks](https://blenderartists.org/user_avatar/blenderartists.org/cotaks/32/21677_2.png) [@Cotaks](https://blenderartists.org/u/Cotaks)\
**Post date:** [December 22, 2012, 11:25am UTC](https://blenderartists.org/t/weapon-s-duplicates-when-switching-weapons/559938/5 "2012-12-22T11:25:09Z")

</div>

as probally everyone expected, using states was the stoopid thing i didnt think about, but works verry well. thanks again 🙂
