Ok im working on a arena code and i need a little help...
Challenge(mob/M in world)
set name="Challenge another user to the arena"
set category="Misc."
world << "[usr] has challenged [M] to the arena!"
var/selling = M << input("[usr] has challenged you to the arena, will you accept?") in list("Accept","Decline") // list of what the shopkeeper sells
var/cost
if(selling == "Accept")
world << "[M] has Accepted [usr]'s Challenge!"
usr.verbs -= /mob/verb/Attack
usr.verbs+= /mob/proc/attack2
usr.ArenaHP += usr.HP
M.ArenaHP += usr.HP
if(selling == "Decline")
world << "[M] had declined [usr]'s Challenge!"
thats my code, it will have the person being challenged get a thing that pops up asking if they will accept of decline, but thats all that happens. when they accept of decline nothing happens. plz help
ID:179822
![]() Oct 28 2001, 4:51 pm
|
|
![]() Oct 28 2001, 5:45 pm
|
|
Are You Making a dbz game?
|
dbz73 wrote:
Ok im working on a arena code and i need a little help...The Grim Reaper Wrote: First off... remove var cost(like I did for your qoute)... 2nd of all... Try it like this and not use that arena code anyway... mob/verb/Challenge(mob/M in world) M:Arena() mob/proc/Arena() var/Decision = input("Accept or Decline?") in list ("Accept","Decline") switch(Decision) if("Accept") (Code of accepting) if("Decline") (Code of declining) The biggest problem is that you're trying to get M to have to decide to accept or decline in the exact same code as you're challenging them... I don't think that can be done, if I'm wrong, oh well... |
The Grim Reaper wrote:
dbz73 wrote: ok thanks, the reason the cost thing is there, is because i basicly took that from my Shop thing heh, yea, my other code i did didnt work right so i did that. |
The Grim Reaper wrote:
dbz73 wrote: erm error, Inconsistent indentation. |
dbz73 wrote:
erm error, Inconsistent indentation. Well that's probably because you copy pasted from the forum which you're never supposed to do, do back and reindent using the tab button. -=|Nadrew|=- |
Nadrew wrote:
dbz73 wrote: i did lol |