proc
Basic_Kick_Combo1() //name of the proc =/
icon_state = "Basic_Kick_Combo_1" //change icon state
attack(mob/M as mob in oview(1))//attack mob in outside view
var/damage = rand(75,100)//do and amount of damage between 75 and 100
M.Stamina -= damage//take away the amount of damage done from the mobs stamina
world << "[src] was hit for [damage] damage!"//display to the world the mob was hit
spawn(15)//sleep for 15 tics
src.DeathCheck()//DeathCheck proc
if(src.var/Stamina <= 0)//if the mobbeing hits stamina is already 0
M.HP -= damage//take damage away from the hit points
DeathCheck()//DeathCheck proc
i dont see anything wrong with it, and every time i try to compile it says by putting in var/damage = rand(75,100) im putting a proc definition in another proc, and no matter what i do try try and fix it that error keeps coming up. Help please?
ID:143521
Aug 16 2007, 2:01 pm (Edited on Aug 16 2007, 2:59 pm)
|
|
In response to Foomer
|
|
didnt do crap for me =/
|
In response to Africanprince94
|
|
Africanprince94 wrote:
didnt do crap for me =/ No, it won't fix your proc, but it will save you a whole lot of headaches in the future if you keep it in mind. Looking at your proc all I see is a big jumbled mess of confusion and I don't even understand what its supposed to do, let alone show you how to fix it. |
Look where you defined attack(), it's in the Basic..() proc.
And follow Foomer's advice to avoid using usr. usr != user, look up what it actually means. |
In response to Foomer
|
|
foomer if you cant understand it/ help, gtfo because your not doing anygood and your just waisting my time
|
In response to Africanprince94
|
|
Well if you're going to be rude I'm definitely not going to help you, although I surely could if you'd actually explained what you were trying to accomplish instead of telling me to "gtfo".
|
In response to Foomer
|
|
sorry i got mad, ive just been stuck for a while and am starting to get a headache
proc Basic_Kick_Combo1() //name of the proc icon_state = "Basic_Kick_Combo_1" attack(M/mob in oview(1)) var/damage = rand(75,100) M.Stamina -= damage world << "[src] was hit for [damage] damage!" spawn(15) src.DeathCheck() if(src.var/Stamina <= 0) M.HP -= damage DeathCheck() its pretty simple, which part of it don't you understand |
In response to Africanprince94
|
|
Basic_Kick_Combo1() //name of the proc It looks like you're starting two separate procs here, or a proc and a verb. Basic_Kick_Combo1() is one proc, while attack() is another. What are you trying to do? src.DeathCheck() I don't understand what's going on here. Why are you calling DeathCheck once, and then calling it again if Stamina <= 0? |
In response to Foomer
|
|
im trying to make one proc that does damage to a mob
and the part you asked below is im saying that if the stamina is equal to or below 0 already, the damage comes out of the hitpoints, and when the players hitpoints reach 0 (which i already coded in (the part about dieing once the hp reaches 0 that is)) |
In response to Africanprince94
|
|
So basically what you want is this?
proc |
In response to Foomer
|
|
basic_kick_combo_1 isnt an icon, its an icon state
|
In response to Africanprince94
|
|
Africanprince94 wrote:
basic_kick_combo_1 isnt an icon, its an icon state Whats your point? |
In response to Foomer
|
|
that gave me about 6 errors =/
|
In response to Africanprince94
|
|
So fix them. :P
|
In response to Foomer
|
|
cmon im really new to coding and i need help
|
In response to Africanprince94
|
|
Africanprince94 wrote:
cmon im really new to coding and i need help I can't do anything for you unless you provide information to work with. You say "help me I got errors!" Woohoo, like anyone can help you there. Maybe if you actually explained what they were, for example, people could help. "but its an icon state not an icon!" That's nice. What are you getting at? Try explaining yourself a little bit. We can't read your mind or your monitor. |
Edit:
I dont think you need the var/ before damage