"I'm out, pass me a clip" Is it possible?

Sloth

Tank
Joined
Jan 7, 2005
Messages
2,832
Reaction score
8
Is it possible to have an NPC, or player throw a clip when someone near them has no ammo. It would be a great thing for a heated battle scene. Seeing an NPC throw you a clip when you out of ammo. Any ideas
 
Technically it is possible, but it would have to be coded differently for different situations.
 
What i was thinking was a command button, say "C" for example, the request is sent out to anyone in a few meters/yards of you, then they respond, also "C" could be used for you to throw it to an NPC.

It was just and idea, i got from Deathmatch, where a mate throw me ammo when i was running low.
Note: I have no coding knowledge, just a cool idea
 
Yes,agreed,I like this idea,I'm sure we have some experinced coders in this forum......
 
Wait, don't the NPC's already do this? Surely you could just alter the coding slightly.....
 
They currently give out medkits, but ammo wouldn't be that much harder. if you wanted to bind it to a key it'd be pretty easy iterate through the global NPC list testing for the proper criteria (NPC alignment, distance, squad, ammo type) then have a new method on the NPC's that will call the pathing routines to get near to the player location, return a false if the NPC can't get to the player, return a true if they can, then call a method that transfers ammo when the player is in range.
 
Would it acutally be thrown or just given?
 
you would probably have to do a bit more work to throw ammo, for NPC's you can probably get away with just creating a "grenade" clip, so instead of grenades NPC's throw clips of ammo at you (friendlies only I assume). If you want them to throw you should probably check out how an NPC handles tossing grenades and modify that.
 
I think that would work...

You could try making another type of grenade that uses its own model but instead of blowing up it would just sit there. If the player picks it up it gives him ammo (I immagine that part of the code would look alot like that of the stunstick).

It would prob be a bitch to get other things right like makign sure the npcs don't throw ammo at the enemy to try and kill them tho.
 
The only thing you'd need from the grenade code is the calculation the computer does to work out how much force it needs.
Remember that everything has physics.

-Angry Lawyer
 
Cunbelin said:
They currently give out medkits, but ammo wouldn't be that much harder.

They give out SMG ammo if your running low too.....
 
perhaps a good idea for someone to try and make it and make a vid out of it??
 
npc's give out whatever type of ammo you set them to give. They dont throw it though.
 
I think at lighthouse point they give you SMG ammo if your running low. They don't during the other parts though.
 
I would look awsome, but could someone try and see if it works?
If so, plz do a video or screenshot.
 
they have given me rpg ammo when fighting gunships and striders...I think it depends on what they are carrying and what you have in your hands at the moment

there is the medic and then 2 or 3 other rebels(by clothing) and one of those other types of rebel is an "ammo man"..
 
Back
Top