Can someone help me with a simple weapon system? +REP

JeveKnight

New Member
Reaction score
2
There are two types of weapons:
Primary weapons, and Secondary weapons.
Say you have 3 primary, and one Secondary.

PRIMARY:

M16
Ak47
Remington 1100

SECONDARY:

M1911 Springfield

How do I make it so that if you're holding a primary weapon, and you pick up another primary weapon, the other one drops so that you cant hold 2 primary weapons?
Same with secondary weapons.
Thanks, +REP given to helpers :D
 

hunterrravyn

TH.net Regular
Reaction score
19
So you can have one secondary and one primary at the same time if so use this

Code:
E-Unit Aquires an item
C-(Item-class of (Item being manipulated)) Equal to (item type of your weapon)
A-For each (Integer A) from 1 to 6, do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
                (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
            Then - Actions
                Hero - Drop the item from slot (Integer A) of (Hero manipulating item)
            Else - Actions
Do nothing

That should work
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top