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

[TF2] Spawning func_nav_prerequisite


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 08-08-2015 , 13:31   [TF2] Spawning func_nav_prerequisite
Reply With Quote #1

So I m trying to spawn working func_nav_prerequisite I have already filled all reqiured stuff such as keyvalues and added filter

Anyone had luck spawning it and get it to work?

Anyway heres the code so far

PHP Code:
public Action:Command_spawnhint(clientargs
{
    new 
Filter CreateEntityByName("filter_activator_tfteam");
    
//DispatchKeyValue(Filter, "filtertype", "1");
    
DispatchKeyValue(Filter"Negated""Allow entities that match criteria");
    
DispatchKeyValue(Filter"TeamNum""0");

    
DispatchKeyValue(Filter"targetname""filter_moveto");
    
DispatchSpawn(Filter);
    
    new 
Float:playerpos[3];
    
GetEntPropVector(clientProp_Send"m_vecOrigin"playerpos);

    new 
entindex CreateEntityByName("func_nav_prerequisite");
    if (
entindex != -1//dispatch ent properites
    
{
        
DispatchKeyValue(entindex"filtername""filter_moveto"); //correct
        
DispatchKeyValue(entindex"Task""2"); //move to task correct
        
DispatchKeyValue(entindex"spawnflags""1"); //clients only
        
DispatchKeyValue(entindex"Entity""gate1_prerequisite_door");//mvtd //realy a ent name
        
DispatchKeyValue(entindex"Value""0"); //correct
        //DispatchKeyValue(entindex, "spawnflags", "64");
        
DispatchKeyValue(entindex"teamnum""0");
    }

    
DispatchSpawn(entindex);
    
SetEntPropEnt(entindexProp_Data"m_hFilter"Filter); //correct
    
ActivateEntity(entindex);
    
AcceptEntityInputentindex"Enable" );

    
TeleportEntity(entindexplayerposNULL_VECTORNULL_VECTOR);

    
PrecacheModel("models/player/items/pyro/drg_pyro_fueltank.mdl");
    
SetEntityModel(entindex"models/player/items/pyro/drg_pyro_fueltank.mdl");

    new 
Float:minbounds[3] = {-100.0, -100.00.0};
    new 
Float:maxbounds[3] = {100.0100.0200.0};
    
SetEntPropVector(entindexProp_Send"m_vecMins"minbounds);
    
SetEntPropVector(entindexProp_Send"m_vecMaxs"maxbounds);
    
    
SetEntProp(entindexProp_Send"m_nSolidType"2);

    new 
enteffects GetEntProp(entindexProp_Send"m_fEffects");
    
enteffects |= 32;
    
SetEntProp(entindexProp_Send"m_fEffects"enteffects);
    
PrintToChatAll("Created the func_nav_prerequisite");
    return 
Plugin_Handled;

__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 08-08-2015 , 13:38   Re: [TF2] Spawning func_nav_prerequisite
Reply With Quote #2

I kinda feel like these entities have to exist on the map when the .nav is generated in order for them to have any effect
__________________
Pelipoika is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 08-08-2015 , 13:41   Re: [TF2] Spawning func_nav_prerequisite
Reply With Quote #3

Quote:
Originally Posted by Pelipoika View Post
I kinda feel like these entities have to exist on the map when the .nav is generated in order for them to have any effect
Maybe not for func_nav_prerequisite however it does affect nav_avoid brush
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
zyox123cc
Senior Member
Join Date: Jul 2016
Location: spycrab
Old 10-11-2016 , 09:50   Re: [TF2] Spawning func_nav_prerequisite
Reply With Quote #4

Is prop?
zyox123cc is offline
Reply



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 00:16.


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