true true...
w.e i can't figure it out i give up
It just angers me trying
All the code you need to be using is there for you. Give up if you want to, but you've already done what you need to do. You are on the right track, you just need to think about it for a few minutes.
ive been doing this for a whole hour i look at the variables but its just not going for me
Well, you need to adapt the projectile example I gave you to the system you already have.
i just dont get it im trying but the example you put ijust dont know what to do with it
obj
fire
icon='person.dmi'
icon_state = "fire"
var
mob/shooter
density=1
Bump(mob/M)
var/damage1 = max(shooter.nin - M.nindef,0)
if(istype(M,/mob))
if(damage1 <= 0)
usr << "-_-"
M << "YOU'RE to fast for [usr]'s attack."
else
M.hp -= damage1
usr << "[usr] -_- up [M] and took [M]'s booty with [damage1] HP!"
M << "[usr] -_- up [M] and took [M]'s booty with [damage1] HP!"
M.deathcheck()
del(src)





i tried doing what you said by tracking the shooter didnt work out >_>
Use DM tags, please. It makes my life not painful.

You need to make sure that shooter gets set to the person who shot the fireball. I don't see any code where you are setting that.

Notice I did it in New(), and then used the usr of a verb to the argument defined under New().
obj
projectile
var
mob/shooter
New(var/mob/m,var/atom/loc=null)
src.shooter = m
return ..(loc)


Notice here, how I overrided the New() proc? I gave it an extra argument, which takes a mob. The argument loc is a built-in argument to the New() proc, so we are calling the default behavior with return ..(loc) at the end. The important thing, is that New() now takes an argument that is a mob, then sets the shooter variable to be that mob you pass into the new proc.

new/obj/projectile(usr,t)


The above bit, is just initializing a new projectile object, which we defined above, using the overrided New() proc, which we are giving usr as the new mob argument.

Make sense?

Apply this to your example by overriding the fireball's new proc, just like we did for projectile. And when you are creating the new fireball, you have to pass the shooter of the fireball as an argument of new().
i did M.nindef but its says its a undefined var >_>
woah just noticed that 5 para essay you wrote
woah just noticed that 5 para essay you wrote

If you think that's an essay, don't go into programming as a hobby. I've read hundreds of several-thousand page books, and more articles and scholarly papers on the subject than I can recall.

Learning to program takes a huge amount of reading and personal study. If you rely on other people to teach, you, though, you will never grasp it. You need to rely on yourself to learn.


Me? I never got past basic math in high school, and I had to teach myself algebra, calculus, trig, and differential equations. Programming is an academic pursuit. There's no way around doing the academics, even if you avoid doing them in formal places of learning. At some point, you'll have to learn the math for yourself.
yea i cant doing this witought fixing that error

obj
fire
icon='person.dmi'
icon_state = "fire"
var
mob/shooter
density=1
Bump(atom/blockage)
var/damage1 = max(shooter.nin-M.nindef,0)
if(istype(blockage,/mob))
var/mob/M = blockage
if(damage1 <= 0)
usr << "-_-"
M << "YOU'RE to fast for [usr]'s attack."
else
M.hp -= damage1
usr << "[usr] -_- up [M] and took [M]'s booty with [damage1] HP!"
M << "[usr] -_- up [M] and took [M]'s booty with [damage1] HP!"
M.deathcheck()
del(src)
New(var/mob/M,var/atom/nl=null)
src.shooter = M
return ..(loc)
woah bro i was just kidding ._.
You can't use M before you have defined it. You need to be defining damage1 below where you defined M.
omg....
just so much errors one after another its just so fustrating
This is what happens when you try to run before you can walk. I did the same thing. I dived right into Borland C++ 3.0 as my first programming language when I was 10. Made things take a lot longer to learn.

Eventually, you figure out how to spot common compiler errors, and don't get so tripped up. Compiler errors aren't so bad. Runtime errors... Those can get rough.
w.e just close the thread im done there is no point in trying now just getting me angry
Page: 1 2