if(usr.overlays== /obj/sword)
usr.overlays -= /obj/sword_control
usr.overlays += /obj/sword_control
Problem description:
why it dont delete overlays and put new ones?
ID:145931
Nov 1 2005, 8:12 am
|
|
Code:
if(usr.overlays== /obj/sword) Problem description: why it dont delete overlays and put new ones? |
Nov 1 2005, 8:12 am
|
|
That if() statement seems useless as hell...
|
In response to Mysame
|
|
? what you mean?
just now only one wep. it should add diferent overlay for differend wep if it worn ! then how to make ? |
User overlays are not going to equal one item, so you have to check if that item would be in your overlays. Like so:
if(locate(/obj/Sword/) in src.overlays) Then, you wanted to delete an overlay and add a new one. This seems so useless because you check for a sword in your overlays and if it's there, you take another overlay away and add the same type of the overlay you have taken away. But, here goes. if(locate(/obj/Sword/) in src.overlays) |
In response to CaptFalcon33035
|
|
dont work. someting with
if(locate(/obj/sword/) in src.overlays) |
In response to Ripiz
|
|
Meaning, you gotta show us more code. Show us the entire porc and the weapons you are dealing with.
|
In response to CaptFalcon33035
|
|
mob |
In response to Ripiz
|
|
Okay, first off, you shouldn't be checking to see if fury is one, because it seems to be a boolean variable. Just use if(src.fury).
Now, you still haven't told me exactly why you're trying to remove sword_control, then add it if there is a sword. I think you might want to add it, then remove it. mob/verb/Spririt_Control() |