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

Creating trigger_multiple


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
notMe2
Member
Join Date: Feb 2014
Old 07-06-2015 , 15:06   Creating trigger_multiple
Reply With Quote #1

I need to spawn a trigger_multiple on map. The objective is to make a start point/end point on a timer. So i got the "area" that i need to make it as start point, vmf gave me this:

Code:
entity
{
    "id" "282198"
    "wait" "1"
    "StartDisabled" "0"
    "spawnflags" "4097"
    "origin" "-8541.5 193 14874.5"
    "classname" "trigger_multiple"
    connections
    {
        "OnStartTouch" "!activatorSetDamageFilternofall0-1"
    }
    solid
    {
        "id" "2889"
        side
        {
            "id" "2890"
            "plane" "(-9540.0 -1109.0 14893.0) (-9540.0 1495.0 14893.0) (-7543.0 1495.0 14893.0)"
            "smoothing_groups" "0"
            "material" "TOOLS/TOOLSTRIGGER"
            "uaxis" "[0.0 1.0 0.0 0] 0.25"
            "vaxis" "[1.0 0.0 0.0 -52] 0.25"
            "lightmapscale" "16"
        }
        side
        {
            "id" "2891"
            "plane" "(-9540.0 -1109.0 14893.0) (-9540.0 -1109.0 14856.0) (-9540.0 1495.0 14856.0)"
            "smoothing_groups" "0"
            "material" "TOOLS/TOOLSTRIGGER"
            "uaxis" "[0.0 0.0 1.0 -32] 0.25"
            "vaxis" "[0.0 -1.0 0.0 0] 0.25"
            "lightmapscale" "16"
        }
        side
        {
            "id" "2892"
            "plane" "(-7543.0 1495.0 14893.0) (-7543.0 1495.0 14856.0) (-7543.0 -1109.0 14856.0)"
            "smoothing_groups" "0"
            "material" "TOOLS/TOOLSTRIGGER"
            "uaxis" "[0.0 0.0 1.0 -32] 0.25"
            "vaxis" "[0.0 -1.0 0.0 0] 0.25"
            "lightmapscale" "16"
        }
        side
        {
            "id" "2893"
            "plane" "(-7543.0 -1109.0 14893.0) (-7543.0 -1109.0 14856.0) (-9540.0 -1109.0 14856.0)"
            "smoothing_groups" "0"
            "material" "TOOLS/TOOLSTRIGGER"
            "uaxis" "[0.0 0.0 1.0 -32] 0.25"
            "vaxis" "[1.0 0.0 0.0 -52] 0.25"
            "lightmapscale" "16"
        }
        side
        {
            "id" "2894"
            "plane" "(-9540.0 1495.0 14893.0) (-9540.0 1495.0 14856.0) (-7543.0 1495.0 14856.0)"
            "smoothing_groups" "0"
            "material" "TOOLS/TOOLSTRIGGER"
            "uaxis" "[0.0 0.0 1.0 -32] 0.25"
            "vaxis" "[1.0 0.0 0.0 -52] 0.25"
            "lightmapscale" "16"
        }
        side
        {
            "id" "2895"
            "plane" "(-9540.0 1495.0 14856.0) (-9540.0 -1109.0 14856.0) (-7543.0 -1109.0 14856.0)"
            "smoothing_groups" "0"
            "material" "TOOLS/TOOLSTRIGGER"
            "uaxis" "[0.0 1.0 0.0 0] 0.25"
            "vaxis" "[1.0 0.0 0.0 -52] 0.25"
            "lightmapscale" "16"
        }
    }
}
and i think the only (or best) way to do this is this way:
Code:
    new ent = CreateEntityByName("trigger_multiple");
    if (ent != -1)
    {
        DispatchKeyValue(ent, "origin", "-8541.5 193 14884");
        ....
    }
but how can i set the size/rotation of the entity?

thanks in advance

Last edited by notMe2; 07-06-2015 at 15:07.
notMe2 is offline
R1KO
Member
Join Date: Sep 2013
Old 07-06-2015 , 15:52   Re: Creating trigger_multiple
Reply With Quote #2

Set size:
PHP Code:
SetEntPropVector(entProp_Send"m_vecMins"m_vecMins);
SetEntPropVector(entProp_Send"m_vecMaxs"m_vecMaxs); 
Float:m_vecMins[3] = {...}
Float:m_vecMaxs[3] = {...}

Last edited by R1KO; 07-06-2015 at 15:52.
R1KO is offline
Send a message via Skype™ to R1KO
notMe2
Member
Join Date: Feb 2014
Old 07-06-2015 , 18:11   Re: Creating trigger_multiple
Reply With Quote #3

Quote:
Originally Posted by R1KO View Post
Set size:
PHP Code:
SetEntPropVector(entProp_Send"m_vecMins"m_vecMins);
SetEntPropVector(entProp_Send"m_vecMaxs"m_vecMaxs); 
Float:m_vecMins[3] = {...}
Float:m_vecMaxs[3] = {...}
thanks for your answer, but, how do i get the vecMins and vecMaxs?
notMe2 is offline
R1KO
Member
Join Date: Sep 2013
Old 07-06-2015 , 18:18   Re: Creating trigger_multiple
Reply With Quote #4

R1KO is offline
Send a message via Skype™ to R1KO
notMe2
Member
Join Date: Feb 2014
Old 07-06-2015 , 18:24   Re: Creating trigger_multiple
Reply With Quote #5

Quote:
Originally Posted by R1KO View Post
thank you
notMe2 is offline
infinite_
SourceMod Donor
Join Date: Mar 2015
Old 07-07-2015 , 13:47   Re: Creating trigger_multiple
Reply With Quote #6

More on creating brush entities (it's a bit old)

https://forums.alliedmods.net/showthread.php?t=129597
infinite_ is offline
notMe2
Member
Join Date: Feb 2014
Old 07-07-2015 , 15:17   Re: Creating trigger_multiple
Reply With Quote #7

Quote:
Originally Posted by infinite_ View Post
More on creating brush entities (it's a bit old)

https://forums.alliedmods.net/showthread.php?t=129597
thanks, what i'm trying to do is to set a start point to a timer. Its working now, but what i want to do is create a entity and set onTouch hook on it do know if the client is on the start point or not. Right now i'm using this:
Code:
if((playerAbs[0] < g_fStartPoint[0][0] && playerAbs[1] < g_fStartPoint[0][1] && playerAbs[2] < g_fStartPoint[0][2]) &&
       (playerAbs[0] > g_fStartPoint[1][0] && playerAbs[1] > g_fStartPoint[1][1] && playerAbs[2] > g_fStartPoint[1][2]))
but its not good at all hehe
notMe2 is offline
notMe2
Member
Join Date: Feb 2014
Old 07-07-2015 , 17:16   Re: Creating trigger_multiple
Reply With Quote #8

@R1KO
witch is the best way to get those positions in game? been working on this all noon but cant find a way to spawn the entity correctly.
notMe2 is offline
R1KO
Member
Join Date: Sep 2013
Old 07-08-2015 , 03:56   Re: Creating trigger_multiple
Reply With Quote #9

Quote:
Originally Posted by notMe2 View Post
@R1KO
witch is the best way to get those positions in game? been working on this all noon but cant find a way to spawn the entity correctly.
these positions should be set.I threw a picture for visual representation.

PHP Code:
new Float:m_vecMins[3] = {-100.0, -100.00.0},
Float:m_vecMaxs[3] = {100.0100.0200.0};

SetEntPropVector(entProp_Send"m_vecMins"m_vecMins);
SetEntPropVector(entProp_Send"m_vecMaxs"m_vecMaxs); 

The size will be 200x200x200
R1KO is offline
Send a message via Skype™ to R1KO
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 22:13.


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