Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GAME] Pickup items do not touch triggers with the "Items" flag (8192) #405

Open
1upD opened this issue Feb 19, 2025 · 1 comment
Open
Labels
Bug Something isn't working

Comments

@1upD
Copy link

1upD commented Feb 19, 2025

Describe the bug

Mapbase adds a new spawnflag to triggers to allow them to trigger off of items, defined as "Weapons, items, and projectiles". In the code, this means allowing entities with the movetype MOVETYPE_FLYGRAVITY.

Using this flag on a trigger_multiple or a trigger_teleport does not have the desired effect because certain pick up items (item_healthkit, item_battery, and item_ammo_pistol have been tested) do not touch the trigger.

Steps to reproduce

Steps to reproduce the behavior:
In Hammer:

  1. Place a trigger_multiple in a map
  2. Set the trigger_multiple to have the spawnflag 8192 for Items
  3. Add an output on the trigger_multiple to kill the activator

In game:

  1. Load your map
  2. Try to throw an item_healthkit entity into the trigger.

The output will not fire.

Expected behavior

Triggers with flag 8192 should allow pickup items (such as item_healthkit) to touch and fire the appropriate output.


Additional context

This is not simply a matter of the trigger filter. These items do have the movetype MOVETYPE_FLYGRAVITY. In addition, if you set the flag for "Everything" (not including physics debris) these items will still not touch the trigger. That indicates that something is preventing the touch function from being called at all. I tried to test if it had to do with collision groups but I had no success.

I have attached a very bare bones map file that demonstrates this behavior.

debug_item_trigger_maps_and_mapsrc.zip

This is necessary for Entropy : Zero 2 for the map ez2_c2_4, which uses trigger_teleport. In the map, there is a bug that healthkits and ammo will not teleport properly.

@1upD 1upD added the Bug Something isn't working label Feb 19, 2025
@1upD
Copy link
Author

1upD commented Feb 20, 2025

Huge thanks to Blixibon for looking into this problem. There is a workaround that I am looking at using and I want to comment it on the issue for visibility. It seems like this problem has to do with pickup items having the solid flag FSOLID_TRIGGER. Perhaps entities with this flag can't touch each other.

Running this output temporarily fixes the problem:

ent_fire item_* RemoveSolidFlags 8

I do still think this should be fixed in the future but hopefully this works for maps that need an immediate solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant