Creating Mines..
Hey guys, I know i've been posting like a nub tonight :oops: , but i've been trying a bunch of new things, and there is still a lot I don't know :(
My latest is trying to make a landmine. I made an entity, did a bunch of code to check radius and whatnot, then got to the detonate mine procedure: Code:
Seems simple enough, but is there a way to check if anyone in that radius was killed so that I can give the killer appropriate experience and frag count? |
What mod's this for?
Quote:
Code:
There's some more checks you need to do also, like check if player is alive and connected and also check the teams. |
I'm making a new matrix mod... but is it possible to check if anyone in that radius was killed so that I can give the killer appropriate experience and frag count?
|
first of all the id in the playermineplanted array will b undefined and i don't think radius damage works anymore. Do
Code:
|
ok... so are you telling me I can't make an array of entities?
|
um, u might b able to get the players origin in the death event, if not, u can get the origin from the damage event when the players health is <= 0 and compare it to your mine and check the distance to see if its in the radius
|
no, i said id would be undefined since u have ident and there is not an id, lol. Btw, why don't u just make ident id and why do u have the task id? I would define all my taskid's.
Code:
|
it's iffy ced.. the person could have been shot while within the radius (unlikely, but possible) I think KCE has got the idea, i'm going to try to implement that... but seriously, how do you make an array of entities?
|
thats why u make sure they r dead first by checking their health, heh
Depends how u want to save your entities. U could do it like this Code:
That could save them if u were looking by each individual, if u just want 1 big list, just make a normal array like KCE did |
Quote:
well to do it for all entities in the game... Code:
What do you mean an array of entities? hmm...I had this problem once before...forgot how I solved it...see if this'll work Code:
|
| All times are GMT -4. The time now is 16:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.