So I know from experience that referencing weapons clientside can be done in multiple ways, the easiest two probably being the following.
Method 1:
Weapon NPC Foo
PHP Code:
//#CLIENTSIDE
function onCreated() {
( @ "Bar" ).foobar();
}
Weapon NPC Bar
PHP Code:
//#CLIENTSIDE
public function foobar() {
// code
}
Method 2:
Weapon NPC Foo
PHP Code:
//#CLIENTSIDE
function onCreated() {
findWeapon( "Bar" ).foobar();
}
Weapon NPC Bar
PHP Code:
//#CLIENTSIDE
public function foobar() {
// code
}
Which way is the "correct" way of referencing another object clientside? What are the differences between the two, if any? In the past I have always used method 1, but now I find myself most certainly wanting to use method 2 as it is an actual command loading an object (findweapon/findweaponnpc) rather than simply listing another weapon name. Might there be more functionality advantages to method 2 versus method 1 or
vice versa that I might be missing?