How to Discern between Health Pack Sizes

Is there a way to tell what size health pack was just picked up by a player WITHOUT only using “Event Healing”?

The issue I have with “Event Healing” is it only counts the actual amount healed not the potential amount given. So if a Player is only missing 10 health, both health packs would return the same “Event Healing” value.

I think the only way you could do this is to note ALL the locations/vectors of both the small healthpacks and the big healthpacks, with that, you can use a “Distance Between” Condition between the player and the big/small healthpack less than 2 and “an event was healthpack” condition. The only problem with this is, is that it’s gonna be tedious and it will take very long to do, like you would maybe have 1 rule per healthpack. Just tell me if you want me to make a code for you.

Nope:

player received healing

condition:
- event was healthpack == true (idk if this exists cause I havent ever used it. Im referring to baxford17 here)

action:
- set player variable(event player, healthpack, first of(sorted array(global variable(hpPositions), distance between(event player, current array element))))
- set player variable(event player, healthpack, value in array(global variable(hpType), index of array value(global variable(hpPositions), player variable(event player, healthpack))))
- if(compare(player variable(event player, healthpack), ==, 0))
- *it is a small healthpack*
- else
- *it is a big healthpack*
- end

“player variable(event player, healthpack)” is just a helper variable here

“global variable(hpPositions)” is an array that contains the positions of all the healthpacks on the map

“global variable(hpType)” is an array that is either 0 for a small HP or 1 for a big HP. It has to match the indices of hpPositions:
hpPositions[4] is a small healthpack → hpType[4] = 0
hpPositions[7] is a big healthpack → hpType[7] = 1

This is a better work around with my solution!! Thanks for extending the help!

1 Like

Why do you didn’t beg the developers of game to make a function for it?
I don’t know is it really necessary thing, but maybe it really useful for some gamemodes. Btw is it true that it is on this forum thread that developers most often watch user posts? I’m talking about the US forum server.

There is no really a reason to beg because everything is well organized inside one thread.

No, Jeff said that moderators are monitoring all forums.


More info about me and my game mods you can find here.
Feel free to comment my ideas.

Maybe. But thats why we got workshop. If there would be a built-in function to create any gamemode, what would be the use of us workshop creators :wink:

Actually got nothing, but okay, let’s consider it as attempt, eh ^^"

It would be nice and as simple as just adding two different events. “event was large healthpack” and “event was small healthpack.”

I would add it to the list, but I’ve already requested additional string operations as well as a way to return array size. Maybe after some of the more important things get added I’ll put it in there.

Thanks for your replies, but this thread is getting a bit off topic. I’ve learned all I need to on this for now, thank you.