Product Chat / Sound Zone Issue

Author
Message
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 28th Aug 2019 22:05
I have a two storey building with a Sound Zone on the floor of the second storey. However, when the player is below the Sound Zone on the ground floor the Zone gets triggered.

Is there a zone script that avoids this?

I triad raising the Sound Zone quite high but it still triggered.

Thanks.
Julian - increasingly disillusioned and jaded
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 28th Aug 2019 22:21
Zones aren't designed to work at height, wherever you put them they trigger from the lowest point to the highest point of the map.

If you want it to trigger at height you will need a custom script that triggers by distance check and put it in an entity where you want it to work.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 29th Aug 2019 06:58
Even if you reycast the entity is most better.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 29th Aug 2019 09:54
OK. Thanks. I made a script that uses player distance. From the way the zone is designed visually I assumed its 2D design would be reflected in its function.

So, if you have a multi-storey building, the standard player in zone script is useless...?
Julian - increasingly disillusioned and jaded
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Aug 2019 10:53
if you want to take height into account then yes the stock script isn't any good - i wouldn't use the standard player distance check to fix though as that means you negate the shape of the zone (standard distance check makes a sphere shape) so i would just apply a Y position check
i.e.
if g_Entity[e]['plrinzone'] == 1 then
if g_PlayerPosY >= g_Entity[e]['y']-61 and g_PlayerPosY <= g_Entity[e]['y']+61 then
--player in zone
end
end
the offsets are to account for the height of the player not being based on his feet so you should give a little modifier each way and check what works well for your game
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
granada
Forum Support
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 29th Aug 2019 12:44
You might want to contact AmenMoses ,he was doing some cool work in that direction a little while back

Dave
Windows 10 Pro 64 bit
GeForce RTX™ 2070 GAMING OC 8G
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
3840 x 2160 ,60 Hz
PM

Login to post a reply

Server time is: 2024-11-24 00:34:05
Your offset time is: 2024-11-24 00:34:05