pac3 icon indicating copy to clipboard operation
pac3 copied to clipboard

Cannot duplicate "entity" part

Open friggityfroggy opened this issue 4 years ago • 6 comments

When setting a group to an owner with multiple instances, such as "frag" for thrown grenade skins, any "entity" part that comes out will only apply to the most recent entity rather than freely duplicating like it does with added models.

friggityfroggy avatar Feb 20 '22 14:02 friggityfroggy

Example outfit? I'm not sure how to do what you're describing

thegrb93 avatar Feb 20 '22 16:02 thegrb93

If I understand this, I think this is expected behavior. You need to check duplicate on the group for it to work.

CapsAdmin avatar Feb 20 '22 17:02 CapsAdmin

Apologies for the lack of information, I meant while "duplicate" is already checked.

As an example, let's say I wished to model swap "npc_metropolice" using a group and "entity" part. I would put an "entity" part in the group, and change the model field of it. With duplicate checked, the expected behaviour would be that each npc_metropolice spawned would get the model swap. However, the swapped model and any other properties of the "entity" part only apply to the first instance of the npc. The same can be said for things like frag grenades, where you can try to model swap it directly with an entity part but it won't be able to apply to multiple grenades at once.

friggityfroggy avatar Feb 21 '22 13:02 friggityfroggy

Does group have this capability? I didn't really see anything in its source code that does this.

thegrb93 avatar Feb 23 '22 18:02 thegrb93

https://github.com/CapsAdmin/pac3/blob/master/lua/pac3/core/client/parts/group.lua#L73-L95

thegrb93 avatar Feb 23 '22 18:02 thegrb93

Yes something is definetly wrong here, I'll have a look at it soon.

I think while I'm at it, I'll make it so duplicate applies on all entities that match, right now it only applies to the ones that spawn after you check duplicate.

CapsAdmin avatar Feb 23 '22 18:02 CapsAdmin