• Tracker

    Spaces
    Browse
    Statistics
  • /
  • /Stable Feedback
  • /DZG-836
Back
1

CreateSoundOnObject can't create sound while in inventory hierarchy, BUT

CharacterServerInventoryModded
1

State

Open
Issue key
DZG-836
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
6wingseraph
Created
Sep 19, 2026
Views
10
Platform
PC Steam
What happened?

while item, on which you trying to attach sound to, never was to the ground, sound will not be spawned on it

So, you either do hoops for example:


void CreateSomeSound()
{
    Object target = this;
    if (GetHierarchyRootPlayer()) { target = GetHierarchyRootPlayer(); }
    g_Game.CreateSoundOnObject(
        target,
        "soundname",
        1, false);
}

Or you somehow move item to the ground and back forth, but we understand, that it smells stinky.

Reproduction steps

Spawn item in inventory, then try to create sound on it.


void CreateSomeSound()
{
    g_Game.CreateSoundOnObject(
        this,
        "soundname",
        1, false);
}


You can move item in between any foreign or your own PlayerBase inventories, but this will not trigger correct sound creation.
ONLY ground will fix future sound creation, while in any inventory hierarchy.

Exact build version (optional)
1.29
Where did it happen?
Local / Offline
Is it modded?
Yes
Expected result

Sound should be able to spawn on item in inventory.

Section
Mod list

testmod

Load order / launch params
—
Reactions

Activity

    about 3 hours ago
  • 6wingseraph
    created issueabout 3 hours ago
  • 6wingseraph
    added tagModdedabout 3 hours ago
  • 6wingseraph
    added tagServerabout 3 hours ago

You are not signed in. Please sign in to see more details and to reply.

State

Open
Issue key
DZG-836
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
6wingseraph
Created
Sep 19, 2026
Views
10