Raised This Month: $ Target: $400
 0% 

[Tutorial] Creating brush entities


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 02-16-2011 , 22:39   Re: [Tutorial] Creating brush entities
Reply With Quote #1

Wow, I didn't think this was possible! Has anyone tried using a func_precipitation to see if it can rain/snow? Or is this something that isn't possible to spawn after the map starts?
__________________
databomb is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 02-17-2011 , 14:35   Re: [Tutorial] Creating brush entities
Reply With Quote #2

Quote:
Originally Posted by Monkeys View Post
What could cause a spawned brush to not show up at all, without any errors?
hhm not sure, what entity and what game?
blodia is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 06-15-2010 , 16:57   Re: [Tutorial] Creating brush entities
Reply With Quote #3

Always good to know that xD Also you can use SDKHooks' ThinkPost to change the bounding box on entitys like that.
Sammy-ROCK! is offline
strontiumdog
Veteran Member
Join Date: Jan 2007
Location: BC, Canada
Old 06-15-2010 , 21:29   Re: [Tutorial] Creating brush entities
Reply With Quote #4

Nice job, B!
__________________
Plugins | TheVille
Zombie Mod for DoD:S - l4dod.theville.org
strontiumdog is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 06-22-2010 , 11:39   Re: [Tutorial] Creating brush entities
Reply With Quote #5

Could one spawn working ladders?
AtomicStryker is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 06-22-2010 , 13:05   Re: [Tutorial] Creating brush entities
Reply With Quote #6

i haven't tried but i don't think you can, in the wiki it mentions "This is an internal entity. When the map is compiled by VBSP it is processed and then removed: it does not exist when the map is running." its the same with some other entities.
blodia is offline
almcaeobtac
Senior Member
Join Date: Nov 2008
Location: Florida
Old 06-22-2010 , 15:29   Re: [Tutorial] Creating brush entities
Reply With Quote #7

Great work, this will be extremely useful!
__________________
almcaeobtac is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 06-30-2010 , 19:31   Re: [Tutorial] Creating brush entities
Reply With Quote #8

This tutorial helped me allot. Thank you blodia !
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 07-01-2010 , 08:36   Re: [Tutorial] Creating brush entities
Reply With Quote #9

Wow! You've done an impossible thing. Nice!
Chrisber is offline
flud
Senior Member
Join Date: Jun 2009
Location: Latvija
Old 07-05-2010 , 06:31   Re: [Tutorial] Creating brush entities
Reply With Quote #10

anyone try trigger_teleport ?

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION    "2.0"

new String:model[PLATFORM_MAX_PATH] = "models/props_mall/mall_shopliftscanner.mdl";

public 
Plugin:myinfo = {
    
name "test",
    
author "FluD",
    
description "test device",
    
version PLUGIN_VERSION,
    
url "www.alliedmods.net"
}

public 
OnPluginStart(){

    
RegConsoleCmd("sm_test"cmd_test"");
}

public 
Action:cmd_test(client,args){

    new 
index CreateEntityByName("prop_dynamic");
    if (
index != -1){
        new 
Float:position[3];
        
GetCollisionPoint(clientposition);

        if (!
IsModelPrecached(model))
        {
            
PrecacheModel(model);
        }
        
DispatchKeyValue(index"model"model);
        
DispatchKeyValue(index"classname""prop_dynamic");
        
DispatchKeyValue(index"disableselfshadowing""1");
        
DispatchKeyValue(index"disablevertexlighting""1");
        
DispatchKeyValue(index"fademindist""-1");
        
DispatchKeyValue(index"fadescale""1");
        
DispatchKeyValue(index"renderamt""255");
        
DispatchKeyValue(index"rendercolor""255 0 0");
        
DispatchKeyValue(index"skin""0");
        
DispatchKeyValue(index"solid""0");
        
DispatchKeyValueVector(index"Origin"position);
        
DispatchSpawn(index);
    }

    new 
trigger CreateEntityByName("trigger_teleport");
    if (
trigger != -1){
        new 
Float:position[3];
        
GetCollisionPoint(clientposition);

        
DispatchKeyValueVector(trigger"origin"position );
        
DispatchKeyValue(trigger"classname""trigger_teleport");
        
DispatchKeyValue(trigger"spawnflags""15");
        
DispatchKeyValue(trigger"StartDisabled""0");
        
DispatchKeyValue(trigger"target""t_out");
        
DispatchSpawn(trigger);
        
ActivateEntity(trigger);
        
SetEntityModel(triggermodel);

        new 
Float:minbounds[3];
        
minbounds[0] = -100.0;
        
minbounds[1] = -100.0;
        
minbounds[2] = 0.0;

        new 
Float:maxbounds[3];
        
minbounds[0] = 100.0;
        
minbounds[1] = 100.0;
        
minbounds[2] = 200.0;

        
SetEntPropVector(triggerProp_Send"m_vecMins"minbounds);
        
SetEntPropVector(triggerProp_Send"m_vecMaxs"maxbounds);
        
        
SetEntProp(triggerProp_Send"m_nSolidType"2);

        new 
enteffects GetEntProp(triggerProp_Send"m_fEffects");
        
enteffects |= 32;
        
SetEntProp(triggerProp_Send"m_fEffects"enteffects);
    }

    new 
destination CreateEntityByName("info_teleport_destination");
    if (
destination != -1){
        new 
Float:position[3];
        
GetCollisionPoint(clientposition);
        
position[0] = (position[0] + 200);

        
DispatchKeyValueVector(destination"origin"position);
        
DispatchKeyValue(destination"angles""0 0 0");
        
DispatchKeyValue(destination"spawnflags""15");
        
DispatchKeyValue(destination"targetname""t_out");
        
DispatchKeyValue(destination"classname""info_teleport_destination");
        
DispatchSpawn(destination);
    }
    return 
Plugin_Continue;
}

stock GetCollisionPoint(clientFloat:pos[3]){

    
decl Float:vOrigin[3], Float:vAngles[3];

    
GetClientEyePosition(clientvOrigin);
    
GetClientEyeAngles(clientvAngles);

    new 
Handle:trace TR_TraceRayFilterEx(vOriginvAnglesMASK_SOLIDRayType_InfiniteTraceEntityFilterPlayer);

    if(
TR_DidHit(trace))
    {
        
TR_GetEndPosition(postrace);
        
CloseHandle(trace);

        return;
    }
    
CloseHandle(trace);
}

public 
bool:TraceEntityFilterPlayer(entitycontentsMask){
    return 
entity GetMaxClients() || !entity;

does not work I will be glad if someone can help
__________________
Beware of a terrible language
flud is offline
Send a message via Skype™ to flud
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 11:55.


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