in my game when you kill some one i want it to be added on to your stats could someone please tell me how to do this. i already now how to make stats in a statpanel i just want to know how i could add 1 to that stat when a mob kills another mob.heres the proc for it.
mob/proc/dp(myAmount)
myAmount += accuracy
if(myAmount > 0)
thealth -= myAmount
if(src.thealth <= 0)
vrdead()
mob/proc/vrdead()
usr.loc = locate(79,68,1)
flick("rteleport",src)
ID:180673
Apr 3 2001, 11:59 pm
|
|
In response to Spuzzum
|
|
On 4/4/01 7:20 pm Spuzzum wrote:
On 4/4/01 2:59 am Haroki wrote: opps sorry the usr is hurting another mob heres the weapon that would be used if it helps at all that is used obj/training name = "Training rifle" verb/shoot(mob/M in oview()) M.dp(5) |
In response to Haroki
|
|
On 4/4/01 9:18 pm Haroki wrote:
On 4/4/01 7:20 pm Spuzzum wrote: Oh, OK. Essentially, you just add an extra argument to each proc, and a kills var to the mob. As an example: mob/var/kills = 1 mob/proc/dp(myAmount,mob/killer) //extra argument that gets passed to vrdead() myAmount += accuracy if(myAmount > 0) thealth -= myAmount if(src.thealth <= 0) vrdead(killer) mob/proc/vrdead(mob/killer) usr.loc = locate(79,68,1) killer.kills++ //increase kill count flick("rteleport",src) obj/training name = "Training rifle" verb/shoot(mob/M in oview()) M.dp(5,usr) //add usr to set killer to the shooter Does that help? |
In response to Spuzzum
|
|
thanks that should be a huge help =)
|
I'd give you code, but your code isn't quite self-explanatory. Who's hurting whom here? I.e. how do you call dp()?