Jail(mob/characters/M in world)
set category = "Police"
world << "[usr] has jailed [M] hahahaha"
M.loc=locate(5,11,9)
M.verbs -= /obj/Kaioken
M.verbs -= /obj/it
M.verbs -= /obj/focus
M.safe = 1
This code is suppose to remove those 3 things so a person cannot escape jail by death or warping out why wont it work?
ID:261658
Dec 7 2002, 7:20 am
|
|
Dec 7 2002, 7:22 am
|
|
The objects were never added to the verbs list, infact objects are never added to the verbs list, commands are. I suggest reading up on how verbs work before posting anything further.
|
In response to Nadrew
|
|
sorry that was the wrong thing this is the code
Jail(mob/characters/M in world) set category = "Police" world << "[usr] has jailed [M] hahahaha" M.loc=locate(5,11,9) M.contents -= /obj/Kaioken M.contents -= /obj/focus M.contents -= /obj/it M.safe = 1 |
In response to Sage_Turak
|
|
Your problem is that verbs are not /obj's. However /path/verb/verbname or /path/proc/verbname is a valid thing to add or remove in the verbs list.
Lummox JR |
In response to Lummox JR
|
|
that doesnt help im a crap coder
|
All coders need help once in a while, like me. Im trying to learn how to program so I dont have to ask questions and help other people. Are You? o.O
|
In response to Sage_Turak
|
|
You're not understanding what they're trying to say, you can't add /obj to the verbs list, much less remove it.
mob |
In response to Xstream Sage
|
|
that still doesnt work cause its not a mob just a obj
|
In response to Sage_Turak
|
|
What exactly are you using to make it /obj?
|
In response to Nadrew
|
|
well here is the kaioken code as an example
obj Kaioken verb Kaioken() set category = "Fighting" var/amount = input("What level of Kaioken?") as num|null if(amount == 0||amount == null) usr << "You begin to release your kaioken...." sleep(rand(50,150)) usr.kaioken = 0 if(usr.powerlevel < usr.maxpowerlevel) usr.powerlevel += 0 if(usr.powerlevel >= usr.maxpowerlevel) usr.powerlevel = usr.maxpowerlevel usr.underlays -= 'kaioaura.dmi' if(amount >= 1) if(amount > (usr.maxpowerlevel / 1341)) usr << "From too much pressure, you explode under Kaioken!!!" view(6) << "[usr] explodes from the use of Kaioken!" usr.powerlevel = 0 usr.Die() if(amount <= (usr.maxpowerlevel / 1341)) if(usr.kaioken == 1) usr << "You need to wait." if(usr.kaioken == 0) if(amount >= 1000) view(8) << "<font color = red><font size = 4>SUPER KAIOKEN!!!!!!!!" usr.powerlevel += (amount * 1341) usr.powerlevel = round(usr.powerlevel) usr.kaiokenstrain() else amount = round(amount) usr.powerlevel += (amount * 1341) usr.powerlevel = round(usr.powerlevel) view(6) << "<font color = red>KAIOKEN TIMES [amount]!!!" usr.stamina -= (rand(1,30)) usr.kaiokenstrain() usr.underlays += 'kaioaura.dmi' usr.kaioken = 1 else usr << "FAULT" and here is the code im using to remove these commands Jail(mob/characters/M in world) set category = "Police" world << "[usr] has jailed [M] hahahaha" M.loc=locate(5,11,9) M.contents -= /obj/Kaioken M.contents -= /obj/focus M.contents -= /obj/it M.safe = 1 |
In response to Sage_Turak
|
|
Then you need to do something like:
M.verbs -= /obj/kaioken/verb/Kaioken
|
In response to Xstream Sage
|
|
nope didnt work
|
In response to Xstream Sage
|
|
Xstream Sage wrote:
Then you need to do something like: > M.verbs -= /obj/kaioken/verb/Kaioken
M.verbs -= /obj/Kaioken/verb/Kaioken
didnt capitalize the first Kaioken... |
In response to Nick231
|
|
i did that still wouldnt remove the move
|
In response to Sage_Turak
|
|
You'll probably have to remove the object from the person's contents.
|
In response to Nadrew
|
|
how bout i send u all my code files and u see my problem
|
In response to Sage_Turak
|
|
How about no, I don't do that.
|
In response to Nadrew
|
|
you could set it up so that when the person is sent to jail you set a variable to 1 and then run a check on the moves to see if they are in jail, If they are tell the usr that they are in jail... then however the person would get out of jail
ex: (This will need to be tweeked to fit your code, the Kaiaken should be usable if you use "injail" as the variable) mob also, always use <dm> and </dm> around your code, soi it is easier to read... |