Okay, I don't want to be like a newbie or anyone babbling about a problem and saying nothing related to it, so here goes...
I have an icon file, Armor.dmi, with the icon state Leather Armor. I have a full system of equipping and removing armor and I need to find out how to make the icon state appear over the player character.
Next, I have a problem that when the character is casting magic it eventually can go below 0, any help on making it not able to cast when not enough magic would help.
And on the lines of magic, I need a way to make it so only the class of mage can recieve spells from trainers.
Those are my problems, I have tried numerous attempts to fix them, but I couldn't. I summed it as all that is needed. I'm on the pager as Jowy if you want to message me there.
ID:150485
Sep 15 2001, 9:27 pm
|
|
In response to FIREking
|
|
FIREking wrote:
Jowy wrote: > obj |
In response to FIREking
|
|
to make the armor appear over the person, the person needs to have the icon_state in his icon file, meaning the Leather Armor icon_state has to be in the same icon file as the person you want to equip it, then you just put this code Not at all! That's just pointless extra work! I thought you knew this stuff, FIREking... Here's an easier way, and you won't have to put iconstates in your main file now.. obj/yellowshirt icon = 'shirts.dmi' icon_state = "yellow" verb Equip() usr.overlays += /obj/yellowshirt UnEquip() usr.overlays += /obj/yellowshirt By the way... FIRE, close your tags. |
In response to Vortezz
|
|
well i figured i would do something that he could have understand, but now that i think of it, your way is easier.
|
As to your casting problem, you could add an if check such as
if(src.mp) //do whatever else src << "You don't have enough magic, jacka**!" return 0 Although the insult is purely optional. -James |
In response to Jmurph
|
|
Jmurph wrote:
As to your casting problem, you could add an if check such as if(src.mp)//do whateverelsesrc << "You don't have enough magic, jacka**!"return 0 Although the insult is purely optional.When I wrote my Boot/Ban Commands for my game I made it inslut me if I tried to boot myself or a npc so I learned nott to mess up and do it unless I want to cuss my self out. |
to make the armor appear over the person, the person needs to have the icon_state in his icon file, meaning the Leather Armor icon_state has to be in the same icon file as the person you want to equip it, then you just put this code
thats pretty much it.
and another tip i want to add, is make sure that if the armor has a drop() verb, that they cant drop it if its equipped. If you dont know how to do that, then ask. You basically make an equipped variable, and set it to 1 when its equipped, then have an if statment see if its NOT equipped in the drop() verb to let them drop it, if it is equipped, tell them that they must unequip it before dropping it. then in the unequip verb, make equipped equal to 0.
--FIREking