Closed 5pHiNxX closed 4 years ago
Why would implement such a feature with a RoomId
, if it's just a flag (true
/false
)?
And how would you implement that ingame?
I already thought of that, but couldn't come up with a satisfying solution. My plan was to check LOS, but that would lead into issues if e.g. a small object is between the players. https://runtime.fivem.net/doc/natives/#_0xFCDFF7B72D23A1AC
For the implementation in the game I would use this native: https://natives.altv.mp/#/0x47C2A06D4F5F424B
It returns the hash of the room the entity (here the player) is in...
And a flag would do the job, you're right.
Oh neat! So you can check if the room is the same and when it's not, you could check LOS - for your door example.
Exactly
Implemented that feature in 0.5.0. Can you play a bit around with it and provide some feedback, so we can improve it and push it to the stable branch?
I have this with Salty: https://www.youtube.com/watch?v=eGmocsEzOGc
Since there was no real feedback > closed
Add the possibility to muffle the sound of people in other rooms. The idea is to introduce a new parameter like
RoomID
and only people with the sameRoomID
can hear each other clearly.A additional great feature would be a second parameter, maybe
IsDoorOpen
of type boolean, that can be set to override the room-muffling. Like if the door to the neighbor room is open and thus the sound should behave as if they were in the same room.I'm thinking of something like this:
https://streamable.com/wj5rl