AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   How to spawn SI near a player (https://forums.alliedmods.net/showthread.php?t=331775)

Gold Fish 04-06-2021 20:40

How to spawn SI near a player
 
Hello, how can you spawn a special infected next to a player? But at the same time, so that the spawn is hidden (behind cover).

There are places where the player stands and there is still a sewer underground or a fence behind the wall where the infected cannot quickly reach the player, taking into account these restrictions, is it possible to find such an accessible spawn place next to the player?

For example, you can spawn infected near a player who is behind his team or left behind

if you use z_spawn_old, then the Si infected one will appear near other players and not near the player that is needed.

It's the same with the native.

PHP Code:

native bool L4D_GetRandomPZSpawnPosition (int clientint zombieClassint attemptsfloat vecPos [3]); 

from Left 4 DHooks Direct

the SI infected will appear near any player

How to find the closest spawn point for the infected (preferably behind cover)?

Maybe there is an option through NavArea? If you can please tell me how.

sorry for my English

Thanks in advance


UPD:

found such a project from Jeremy F93 https://forums.alliedmods.net/showthread.php?p=2678469
there is a native that uses the Find Nearby Spawn Spot function

She finds the closest spawn spot to the player at the specified distance, this is certainly not an ideal solution, but with her help I can already find the spawn spot of the infected in a few attempts, even if I'm lucky the spawn spot will be in cover and nearby




-
-

sorallll 04-12-2021 12:47

Re: How to spawn SI near a player
 
https://github.com/brxce/Gauntlet/bl...SS2_NavMesh.sp


All times are GMT -4. The time now is 23:13.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.