AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   trigger_multiple properties (https://forums.alliedmods.net/showthread.php?t=121749)

KadiR 03-19-2010 12:37

trigger_multiple properties
 
I wanted to create In-Game a trigger_multiple entity with these properties:

PHP Code:

    set_pev(ent1pev_targetname"entity_name")
    
set_pev(ent1pev_target"target_name"

I found this from a homepage:

Quote:

# Target (target) - When an entity is activated, it triggers the entity with the name specified by Target.
# Name (targetname) - Property used to identify entities.
And now, I would like to use these 2 properties but I don't know how to use it in the plugin:

Quote:

1. Delay before trigger (delay) - Usually the time in seconds before an entity should trigger its target (after being triggered itself). Under other SmartEdit names, delay might also be the time to wait before performing some other action.

Delay before reset (wait) - Time in seconds before the entity is ready to be re-triggered.

Xellath 03-19-2010 13:20

Re: trigger_multiple properties
 
http://www.amxmodx.org/funcwiki.php?go=func&id=358

With that you can edit keyvalues.

Exolent[jNr] 03-19-2010 13:57

Re: trigger_multiple properties
 
Extending on what Xellath said:
PHP Code:

new iEntity create_entity"trigger_multiple" );
DispatchKeyValueiEntity"target""" );
DispatchKeyValueiEntity"targetname""" );
DispatchKeyValueiEntity"delay""" );
DispatchKeyValueiEntity"wait""" );
DispatchSpawniEntity );
// do your entity stuff here 


KadiR 03-19-2010 14:30

Re: trigger_multiple properties
 
Nice stuff Exolent + Xellath, can you show me also this for engine please:

PHP Code:

dllfunc(DLLFunc_SpawniEntity);
        
engfunc(EngFunc_SetOriginiEntityFloat:{-1163.0, -2223.0, -4.0}); //position of the uber bot...
        
engfunc(EngFunc_SetSizeiEntityFloat:{-64.0, -64.0, -64.0}, Float:{64.064.064.0}) //size of the entity... 

+

PHP Code:

pev(entpev_targetnamename50)
        
pev(entpev_targettarget50


Exolent[jNr] 03-19-2010 14:40

Re: trigger_multiple properties
 
Searching does wonders.

KadiR 03-19-2010 15:10

Re: trigger_multiple properties
 
Something like this?

PHP Code:

CreateEntity( const Float:flMins], const Float:flMaxs] )
{
    new 
iEntity create_entity"trigger_multiple" );
    
    if( !
is_valid_entiEntity ) )
        return 
0;
    
    
DispatchKeyValueiEntity"classname""trigger_multiple" );
    
DispatchKeyValueiEntity"targetname""target" );
    
    
DispatchSpawniEntity );
    
    
entity_set_sizeiEntityflMinsflMaxs );
    
entity_set_intiEntityEV_INT_solidSOLID_TRIGGER );
    
    return 
iEntity;




All times are GMT -4. The time now is 08:44.

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