Hi,
I have a scenario where I spawn multiple props for each of 5 players using SpawnProp() and store all spawned props in an array per player.
What I want to achieve is:
-
When another player (not the owner) touches a prop, that player should die, and
-
The owner of the prop should receive 1 elimination point.
So inside the collision event, I need to know:
-
Which player owns the prop.
-
Which player touched the prop.
Is there a way to add a collision component to my Blueprint class and subscribe to its collision event in Verse?
Or is there another recommended way to implement this logic?
Hey @DarkForest144 how are you?
I think the best way to do it is by spawning an invisible “damage volume” in the same position as the spawned prop, and subscribe to its “AgentEntersEvent”, which will let you know who “touched” the prop. Then, with that info you should be able to do whatever you want, like eliminating that agent and giving eliminations to the owner of the prop/damage volume.
Remember you can subscribe to “UpdateSelectedTeam” to assign the team of the owner player to the damage volume when you spawn it, and that you should set the option “Invert Team Selection” on your damage volumes.
You will probably eed to use a map to link your damage volumes with your props or agents.
Hope this helps you!