mob
proc
deathcheckbot(mob/M)
if(M.hp <= 0)
src.exp += M.level
src.money += M.money/2
M.dead = 1
del(M)
var/obj/blood/B = new(M.x,M.y,M.z)
spawn(100)
del(B)
Problem description:I want the bot to drop blood when it dies.
ID:144556
![]() Oct 29 2006, 6:00 pm
|
|
Code:
mob Problem description:I want the bot to drop blood when it dies. |
![]() Oct 29 2006, 8:08 pm
|
|
You're deleting M then your trying to place it where M is. Since M is already deleted, it's not there and M.x, y, and z are null. Move var/obj/blood/B = new(M.x,M.y,M.z) up 2 lines.
|
mob/proc |
Your death check is backwards. In a death check proc, src must always be the victim. (The proc mostly concerns the victim, and has much less to do with the killer.) M, therefore, should be the killer.
Lummox JR |
Considering that's not what his problem was, and the fact that it doesn't always need to be it since its the same as carrying the killer as M.. the point of that post was? >.>
|
VcentG wrote:
Considering that's not what his problem was, and the fact that it doesn't always need to be it since its the same as carrying the killer as M.. the point of that post was? >.> Yes, src always needs to be the victim. Never write a proc for the wrong src. It's bad design, and bad design leads to worse bugs. Lummox JR |
lol just ignore lummox, he never knows what hes talking about, he just likes to use the words src and usr in his posts as much as possible
|
Falacy wrote:
lol just ignore lummox, he never knows what hes talking about, he just likes to use the words src and usr in his posts as much as possible This from the person that says if(a) is equivalent to if(a == 1)? Lummox is one of the staff that works on the source code of the compiler. Coupled with the fact that he has a masters degree in computer science, if I remember correctly, I'm infinitely certain he knows more about what he's talking about than you do. |
Popisfizzy wrote:
This from the person that says if(a) is equivalent to if(a == 1)? close enuf! Lummox is one of the staff that works on the source code of the compiler. Coupled with the fact that he has a masters degree in computer science, if I remember correctly, I'm infinitely certain he knows more about what he's talking about than you do. byond is going downhill, i blame that on lumox's crapy work, so, bad point to make =P also im in college right now to get a degree in programming, and planning on going to full sail after im finished here to get one in game design, so, lummox nooblar knows nothing compared to me! |
Close enough? Hardly.
proc/FalacyIsWrong() Please, run that code and tell me what it evaluates to. |
running that code would do nothing considering its a proc and it doesnt get called anywhere... so! you lose =P
|
lol, seeing as i just outsmarted you does that make you a retarded puppy? and yes i know im not right about that! but, if a=1 and you say if(a) or if(a==1) they yield the same result, which was the case when i made the comments =P
|
Hell, if we're going with that, then I geuss pi is equal to exactly three because of this.
|
mmmmm, pie...
also, if that equation made any sense at all the answer to everything would be 0... you cant do that to an equation lol |
if both of you continue this line of off-topic spam, then i will personally ban both of you from the forums for a lengthy period of time. this roughage serves *no* purpose.
don't even bother continuing to post in this thread unless you are helping out the original poster. (and smart-ass comments mixed with helpful content is not appropriate either). please do something more constructive with your free time. |
*pokes mouse in the eye*
now as i was saying, if you multiply both sides by 0 you get 0pi=0 not 0=0 o.O *still doesnt undertsand y byond has forums if youre not even alowed to post on them, how stupid can u get* you dont see me closing topics on my forums because they got too many posts, thatd just be dumb! now granted this topic has gone rather off topic... but eh! *waits to be bant... again* |
Falacy wrote:
<font color="blue">> *pokes mouse in the eye* now as i was saying, if you multiply both sides by 0 you get 0pi=0 not 0=0 o.O BYOND has forums for helping people as well as sharing creations and ideas. you recent posts in this thread and elsewhere contain none of that- only flames and smart-ass commentary. <font color="blue">> you dont see me closing topics on my forums because they got too many posts, thatd just be dumb! now granted this topic has gone rather off topic... but eh! *waits to be bant... again*</font> take 30 days off. hopefully you'll return a more productive member of the community. i know you can- you just need to stop with the crap posts in-between. it makes you look like a troll. we don't need trolls here. for the rest of you, either help this guy out, or move on. |