Is their a way to make it were...
kills<500 = Rank 1
kills<2000 = Rank 2
kills<9000 = Rank 3
kills<50000 = Rank 4
and so on...
Basically.
You get a kill (target has died).
It adds 1 kill to total count.
--- --- ---
1
2
ID:159940
Dec 15 2008, 5:14 pm
|
|
Dec 15 2008, 5:24 pm
|
|
Assuming you have a proper death system set up, doing it like so should allow it:
|
Make a Death() proc that's called every time a mob's health hits 0 or below. The person who did the killing will need to be defined inside the parentheses so you can add a kill to them. As for making them a certain rank, you'll need to create another proc to handle that, unless you want a bunch of if() statements in your Death() proc.
Example mob/verb/Attack(mob/M in get_step(usr,usr.dir)) |
In response to Mizukouken Ketsu
|
|
Mizukouken Ketsu wrote:
will need to be defined inside the parentheses This is called an argument, for reference. |
In response to Alathon
|
|
I know, but maybe he doesn't. I was putting in terms that even a newbie to DM programming could understand.
|
In response to Mizukouken Ketsu
|
|
Mizukouken Ketsu wrote:
I know, but maybe he doesn't. I was putting in terms that even a newbie to DM programming could understand. Which is why I mentioned what its called, or how is the person ever supposed to learn? |
In response to Popisfizzy
|
|
Instead of calling the proc everytime you kill a mob, it'd be better if you call the proc only if you have the requirements.
|
In response to Mizukouken Ketsu
|
|
You should use switch() instead, on the rankUp().
|
In response to Andre-g1
|
|
switch(Kills) Like that? |
In response to Mizukouken Ketsu
|
|
Yeah.
|
In response to Andre-g1
|
|
Is a switch() statement faster/more efficient than an if() and else if()s?
|
In response to Mizukouken Ketsu
|
|
Yes, read the reference entry for switch().
|
In response to Mizukouken Ketsu
|
|
No offense, but you shouldn't try to help people on the forums if you don't know DM all to well, wait like a year or so and you'll be good probably.
Edit: Cause it would be bad to teach people some bad methods, so its usually best to wait till you've been programming for about 4 years. |
In response to Bakasensei
|
|
Bakasensei wrote:
Edit: Cause it would be bad to teach people some bad methods, so its usually best to wait till you've been programming for about 4 years. 4 years ?! What an absurdly high amount of time... Hell, I've only been programming for ~9 months and I wouldn't say I'm giving bad advice to people around here. |
In response to Andre-g1
|
|
The proc is what determines the requirements, skip. It's a very simple proc, and it won't take any time at all to process, especially considering that killing couldn't occur, even at the best scenario, more than once every couple seconds.
|
In response to Popisfizzy
|
|
What's wrong about that ? It seems I just missed the bit about the boolean vars, but meh.
|
In response to Andre-g1
|
|
It's because the whole bit is wrong.
|
In response to Bakasensei
|
|
No offense, but please don't post just to say "you suck at helping because you have no experience. Come back when you've been doing [whatever] for X years"
The snippet I originally posted was 100% functional. Andre-G1 was just giving a little improvement note. I was confirming on how to use it properly in my snippet and asked why it's better. Nothing too "newbie" about it. A simple confirmation with a question. I did in fact read the guide about switch() statements, but reading doesn't really do it for me. I learn by example. So before you go off on you high and mighty posting spree, try thinking first. "No offense" or anything... |
In response to Mizukouken Ketsu
|
|
Mizukouken Ketsu wrote:
The snippet I originally posted was 100% functional. Functionaly and quality correlate only distantly, and, to be honest, the snippet wasn't very good. |
1
2