ID:165799
Oct 30 2006, 6:35 am
|
|
how do i make an equip verb?, so i can have weapons in my game
|
Oct 30 2006, 6:43 am
|
|
mob //Mobile |
VolksBlade wrote:
how do i make an equip verb?, so i can have weapons in my game The most important thing for an equipment system is to set it up properly. The mob should have vars telling it which weapons/armor/etc. it has equipped; those vars need to point to the objects themselves, or be null if none is in use. A simple equipment system might be set up like this: mob For armor you'd use the same thing, but for the armor var. A more complex system--but not much more--might assign equipment slots instead. mob With this you can give weapon a var of slot="weapon", armor slot="armor", etc. Runt uses this system, with slots for a weapon, armor, shield, helmet, gloves, boots, ring (only one), and amulet. Lummox JR |
In response to Xx Dark Wizard xX
|
|
Xx Dark Wizard xX wrote:
obj Incorrect. Any equipment system must always always always give the mob a var telling it which item is in use, not just set a suffix or tell the item itself. The mob must always be able to easily find the item it's using. Lummox JR |
In response to Miran94
|
|
This system will basically work because the W var will show if a weapon is in use. The Equip var, however, is useless and should go; W is all you need. Also when unequipping the weapon, W should be set to null, not "", although it will still work the way you did it with minimal potential for problems.
Lummox JR |