View Single Post
  #12  
Old 09-10-2011, 10:47 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by furry_mougle View Post
I don't want to like spam the thread by asking meaningless questions, but essentially what you mean by System NPC is to create an NPC called -System/Equipment (does the -System even mean anything? wat) (on testbed mind you) and manage the equipping and dequipping of weapons? Huh? Why would you create a SYSTEM Npc for that? Why not a class?
A class is basically just for pasting functions into your script/weapon/level-npc. It doesn't actually exist as anything until it's joined to an DB-NPC Weapon-NPC, Level-NPC, or an object.

By System NPC I just mean a weapon that is added to the player that's primarily used for background tasks and as a database. In this case it's used to keep track of what weapon you currently have equipped and provides a standard way of equipping a weapon.

If you have two weapons: A and B, and you equip A how will B know that you have equipped A if you only tell A that it's equipped?

To deal with that you use a system npc and route your equip requests through it like my example does.

You don't have to use -System/Equipment as the weapon name either, you can use any name just make sure you update the scripts to make calls to it instead of -System/Equipment.
__________________
Quote:
Reply With Quote