Raised This Month: $12 Target: $400
 3% 

How to spawn SI near a player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Gold Fish
Senior Member
Join Date: Mar 2020
Old 04-06-2021 , 20:40   How to spawn SI near a player
Reply With Quote #1

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




-
-
__________________
-

PHP Code:
public OnClientConnect(int Client) {
    
KickClient(Client"sorry");


Last edited by Gold Fish; 04-07-2021 at 09:54.
Gold Fish is offline
sorallll
Senior Member
Join Date: Oct 2018
Old 04-12-2021 , 12:47   Re: How to spawn SI near a player
Reply With Quote #2

https://github.com/brxce/Gauntlet/bl...SS2_NavMesh.sp
sorallll is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:16.


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