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

Solved Make weapon_ entity untouchable


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
glhf3000
Member
Join Date: Aug 2010
Location: middle-universe
Old 11-28-2021 , 21:11   Make weapon_ entity untouchable
Reply With Quote #1

I am trying to spawn extra medkits for l4d2 finale maps and dont want for infected players to be able to touch(move) them. In other words i want to convert them to static objects, not dynamic (affected by world physics?).
Tried m_CollisionGroup 1, m_nSolidType 0, spawnflags 8, but with no success.

What is the correct way to do this?

PHP Code:
int entity CreateEntityByName("weapon_first_aid_kit");

    if(
entity != -1)
    {                            
        
TeleportEntity(entitylocanglesNULL_VECTOR);
        
        
DispatchKeyValue(entity"targetname""l4d2_medkit_finale_fix");
        
        
DispatchSpawn(entity); 

Last edited by glhf3000; 11-28-2021 at 21:56.
glhf3000 is offline
glhf3000
Member
Join Date: Aug 2010
Location: middle-universe
Old 11-28-2021 , 21:56   Re: Make weapon_ entity untouchable
Reply With Quote #2

SetEntityMoveType(entity, MOVETYPE_NONE);
with 0.1 timer

Last edited by glhf3000; 11-28-2021 at 21:58.
glhf3000 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-29-2021 , 06:08   Re: Make weapon_ entity untouchable
Reply With Quote #3

Nice you solve it

Maybe this helps as well: https://forums.alliedmods.net/showthread.php?t=328327
__________________
Marttt is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 12-02-2021 , 09:32   Re: Make weapon_ entity untouchable
Reply With Quote #4

Quote:
Originally Posted by [ru]In1ernal Error View Post
SetEntityMoveType(entity, MOVETYPE_NONE);
with 0.1 timer
I am pretty sure you can use SetEntityMoveType right after DispatchSpawn. Or with RequestFrame instead of a timer.
__________________
MAGNAT2645 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 11:28.


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