Equipment in Developer Help
|
|
Code:
var/mob/Player equipwep=0 equiparm=0
obj weapon verb equipwep() set name = "Equip Weapon" if (equipwep == 1) usr<<"<b> A weapon is already equipped!" else equipwep += 1 usr.overlays+=src.icon usr<<"<b> You equip a weapon!" UnequipW() set name = "Unequip" if(equipwep ==0) usr<<"<b> Equip something first!" else equipwep -= 1 usr.overlays-=src.icon
usr<<"<b> You un-equip your Weapon!"
obj armor verb equiparm() set name = "Equip Armor" if(equiparm == 1) usr<<"<b> Armor is already equipped!" else equiparm += 1 usr.overlays+=src.icon usr<<"<b> You equip some armor!" UnequipA() set name = "Unequip" if(equiparm ==0) usr<<"<b> Equip something first!" else equiparm -= 1 usr.overlays-=src.icon
usr<<"<b> You un-equip your Armor!"
|
Problem description:
This is the equipment system i've developed. I am a novice programmer and this is the first equip system ive worked on. This code seems to work in game, I cant equip two different weapons or armor. but I think that if two or more players tried to equip something it wouldnt work, because I set the equiparm and wep variable in Player.I have no way of testing this, and I was just wondering if anyone could tell me if this is true or im just being paranoid.
|