Author Topic: IfPlayerHasWeapon Event  (Read 629 times)

Examples

Onplayertouch->Player->CheckWeapon

IfPlayerHasWeapon->Etc.

great idea
it should also have a checkbox to see if the weapon is equipped

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.

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.

this is the best way to do it

Can already be done with VCE (r.i.p.)

Code: [Select]
[x] [0] [Onactivate] [Self] [VCE_Ifvalue] [<var:pl:item2>] [==] [Wrench] [1 1]
[x] [1] [Onvariabletrue] [Self] [Setcolor] [16]

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.
« Last Edit: September 14, 2013, 06:18:50 PM by Gen. Hothauser »

To avoid using multiple events in that fashion, it'd be: OnPlayerTouch > Player > ifHasWeapon [weapon]> //Do something.
how would "do something" work? Another line of events?
plus i meant for "CheckWeapon" to have a box

Do something is just whatever output you use when your player is holding said object.

However, I realized there is actually a flaw with my method; the output events can only be applied to the player - not bricks, client, or anything else.

no other events work like what you suggested
it would be impractical considering you wouldn't be able to make an IfPlayerDoesNotHaveWeapon input event but instead have to go straight to an output event which would really limit the event's uses