Blockland Forums > Suggestions & Requests
IfPlayerHasWeapon Event
TB2:
Examples
Onplayertouch->Player->CheckWeapon
IfPlayerHasWeapon->Etc.
AromaniaFTW:
great idea
it should also have a checkbox to see if the weapon is equipped
BluetoothBoy:
To avoid using multiple events in that fashion, it'd be: OnPlayerTouch > Player > ifHasWeapon [weapon]> //Do something.
Also, a checkbox wouldn't be needed to check that. That's for outputs, not inputs. I would make it, but I'm already back-logged in the addon department.
hodototman:
--- Quote from: BluetoothBoy on September 14, 2013, 01:20:00 PM ---To avoid using multiple events in that fashion, it'd be: OnPlayerTouch > Player > ifHasWeapon [weapon]> //Do something.
Also, a checkbox wouldn't be needed to check that. That's for outputs, not inputs. I would make it, but I'm already back-logged in the addon department.
--- End quote ---
this is the best way to do it
Gen. Hothauser:
Can already be done with VCE (r.i.p.)
--- Code: ---[x] [0] [Onactivate] [Self] [VCE_Ifvalue] [<var:pl:item2>] [==] [Wrench] [1 1]
[x] [1] [Onvariabletrue] [Self] [Setcolor] [16]
--- End code ---
This is the test I did, but can be changed to suit your needs.
[edit]
The values <var:pl:item[1-5]> exist. I'm not sure if <var:pl:item[6-9]> are made. You can also use <var:pl:currentitem> for the held item.