AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [Tutorial] Creating brush entities (https://forums.alliedmods.net/showthread.php?t=129597)

kumpu 02-24-2015 00:52

Re: [Tutorial] Creating brush entities
 
1 Attachment(s)
Hello!
Trying to write a plugin that add's buyzones to the map if there are none.
Now I have 2 problems:
- I could not figure out a good way to get the team spawn coordinates to teleport the buyzone to. Right now I'm looping through all clients to get a t and ct client's position.
- It doesn't work. No errors, the buyzone just doesn't show up. With bots i got the following console message:
Code:

pos0: 632.000000, pos1: 267.000000, pos2: -295.000000(debug msg by plugin)
CT bot spawned outside of a buy zone (632, 267, -295)

As you can see, I already tried to move the 3. coordinate, because it seemed to be > than the bot spawn coordinate otherwise - no success.

My Code:
Spoiler

Also attached the .sp because formatting is nice.
Can someone please help me a bit?:3 (sorry for reviving an old thread)

Ms. Trooper 05-07-2015 22:40

Re: [Tutorial] Creating brush entities
 
What is the best way to recreate normal, solid, visible, walls?

kadet.89 05-08-2015 13:19

Re: [Tutorial] Creating brush entities
 
The only way is to use prop_dynamic's with wall models
But, may be there is another way:
http://www.youtube.com/watch?v=mjGByP5hRNY 1.05
There is a transparent bridge which is made of brush and players can spray decals on it. Perhaps you can recreate this brush entity with the help of this tutorial and texture it with decals
When the bridge disables, decals sprayed on it disables too. So, even if it will work, you won't be able to make physics visible brush this way

yash1441 05-31-2016 07:18

Re: [Tutorial] Creating brush entities
 
Really helped a lot! Thanks.

Indarello 02-08-2019 05:38

Re: [Tutorial] Creating brush entities
 
Code:

        new entindex = CreateEntityByName("prop_dynamic_override");
        DispatchKeyValue(entindex, "solid", "6");
        SetEntityModel(entindex, "models/props/cs_office/vending_machine.mdl");
        DispatchSpawn(entindex);
        ActivateEntity(entindex);

        //TeleportEntity(entindex, NULL_VECTOR, NULL_VECTOR, NULL_VECTOR);


        new Float:minbounds[3] = {-3023.0, -2552.0, 310.0};
        new Float:maxbounds[3] = {3767.0, 4429.0, 600.0};
        SetEntPropVector(entindex, Prop_Send, "m_vecMins", minbounds);
        SetEntPropVector(entindex, Prop_Send, "m_vecMaxs", maxbounds);
               
        SetEntProp(entindex, Prop_Send, "m_nSolidType", 2);

        new enteffects = GetEntProp(entindex, Prop_Send, "m_fEffects");
        enteffects |= 32;
        SetEntProp(entindex, Prop_Send, "m_fEffects", enteffects);

that what I use in CS:GO for creating walls

XGAK 08-06-2019 09:16

Re: [Tutorial] Creating brush entities
 
I want to create a func_movelinear parent to func_rotating, like this video.
But the func_movelinear won't fire any outputs if it's parented to something.I wonder is there a way to fix this.

XGAK 08-07-2019 23:48

Re: [Tutorial] Creating brush entities
 
Quote:

Originally Posted by eyal282 (Post 2662336)
Stripper Source.

But creating a brush entity need to add dimension for creating "box".Stripper can't do this.

Ilusion9 01-02-2021 08:36

Re: [Tutorial] Creating brush entities
 
How to create invisible walls in CS:GO (maybe you can set a model?):

PHP Code:


        int entity 
CreateEntityByName("func_wall_toggle");
        
        if (
entity != -1)
        {
            
DispatchKeyValueVector(entity"origin"zoneInfo.vecOrigin);
            
            
DispatchSpawn(entity);
            
ActivateEntity(entity);    
            
            
SetEntityModel(entity"models/error.mdl");
            
SetEntProp(entityProp_Send"m_nSolidType"2);
            
            
SetEntPropVector(entityProp_Data"m_vecMins"zoneInfo.vecMins);
            
SetEntPropVector(entityProp_Data"m_vecMaxs"zoneInfo.vecMaxs);
            
            
SetEntProp(entityProp_Send"m_fEffects"GetEntProp(entityProp_Send"m_fEffects") | EF_NODRAW); 
        } 



All times are GMT -4. The time now is 11:56.

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