Author Topic: Health & ammunition resupply system  (Read 4277 times)

I am in need of this sort of resupply system for my ctf_turbine build and I think the community could benefit from it as well. I wonder why this hasn't been made before.

The main idea is that there are items that restore the player's health or ammunition when they are picked up. They do not go to your inventory and you can't use them later. You simply walk over the spawned item, it restores your health/ammo and then it disappears for a set amount of time which can be changed with an RTB pref.

It would be great if other people could expand on this script (Thus the "system" suffix) to easily create their own health and ammunition kits with custom models and amounts for the health and ammo. I think using the Tier Tactical 2 ammunition system might be the best alternative or just make the script compatible with them all.

Yay? Nay?


Health kits released: http://forum.returntoblockland.com/dlm/viewFile.php?id=3340

Now concentrating on the ammunition system.

The ammo should fit all weapons. The ammo is dropped when the player dies. I can do the model for it. Ammo dropped by dead players refill 50% of the player's current weapon's maximum ammo capacity. The ammo boxes refill 20%, 50% and 100% of the player's current weapon's maximum ammo capacity, but you need not worry about that.
« Last Edit: April 06, 2011, 06:37:54 AM by Demian »

Could you modify the T + T ammo pile item script? And for the health, you could just make brick that set your health to full when clicked or touched but then dissapears for a set amount of time. (Wait, is this build of yours TF2?)

Could you modify the T + T ammo pile item script? And for the health, you could just make brick that set your health to full when clicked or touched but then dissapears for a set amount of time.
Yes you could make these with events. But I'm just saying that it would be easier for the community in general to have these as items. Even though I have made these things for my build with events, I want to do it with items.

(Wait, is this build of yours TF2?)
Yes.

Perhaps these will raise the interest in this.












Sadly i cant help Demain cuase i dont script.
but ill help by bumping

Sadly i cant help Demain cuase i dont script.
Thank you for your contribution.


I am about to go learn some scripting soon, maybe you can give me a message in a week or two?

Just take the script from the pill and medkit and replace them :)

Perhaps these will raise the interest in this.
-snip-
i must say, i aprove :o
maybe just have the items be able to trigger events (the onitempickup event), then use events for adding health/ammo (ammo would need a new event with new weapons), and then event the dissapearing of the item/reappearing

I'm planning on redoing my entire TF2 ammo system based on the Bushido system.
also holy stuff i just re-skimmed this and
whoa those things again
whoa they look amazing
i'll consider it very strongly.
« Last Edit: March 28, 2011, 05:48:17 PM by The Titanium »

I'm planning on redoing my entire TF2 ammo system based on the Bushido system.
also holy stuff i just re-skimmed this and
whoa those things again
whoa they look amazing
i'll consider it very strongly.
Thanks Titties. The ammo system was the other thing I needed besides this resupply system. <3

The ever so wonderful Bauklotz and McTwist got their heads together and did some script battling to create me a lovey script for the healing. The ammo refill needs more research though. Might be releasing in a week.

Gah. Okay, these ammo crates should refill respectable amounts of ammo to every ammo type that exists in a server.

Say, if one crate fills 50% of the max ammo of a certain weapon type, and that weapon's max ammo is 32, and it currently has 0, it will get 16/32.
If it had 3 while getting that 50% ammo, it would have 19/32.
There should be rounding to the nearest one for weapons that have uneven numbers for max ammo.

The thing that sucks is that, at a glance, so far, Bushido's ammo system looks kind of inelegant.
Oh well, it's probably less buggy than mine.
Meh, I'm just kind of sad that all my work on those weapons has been put to waste now.




I have a question: With T+T, if you have no ammo, then you get a gun (assuming it comes with ammo) and die, will that ammo be dropped? I wish to know if I should manually create ammo types with the models of the existing weapons that drop when...
well...
wait, that's not how it works.
only the weapon you're holding is supposed to drop.
I guess I should alter that effect somehow.
I wonder if there's a non-conflicting way to do it.
« Last Edit: March 30, 2011, 04:56:01 PM by The Titanium »

Meh, I'm just kind of sad that all my work on those weapons has been put to waste now.
Don't worry, I'm sure it'll come in handy sometime :D