Raised This Month: $2 Target: $400
 0% 

trigger_multiple trigger for weapons?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-17-2011 , 19:43   trigger_multiple trigger for weapons?
Reply With Quote #1

I'm creating a trigger_multiple with spawnflags set to 64:

PHP Code:
new iEnt CreateEntityByName("trigger_multiple");
DispatchKeyValue(iEnt"spawnflags""64");
DispatchKeyValue(iEnt"wait""1");
DispatchSpawn(iEnt);
ActivateEntity(iEnt);
HookSingleEntityOutput(iEnt"OnStartTouch"EntOut_OnStartTouch);
// ... teleport set max/min 
Now in the output callback i just print out the classname of the entity touching:
PHP Code:
public EntOut_OnStartTouch(const String:output[], calleractivatorFloat:delay)
{
    
decl String:sClassName[64];
    if(
IsValidEntity(activator)
    && 
IsValidEdict(activator)
    && 
GetEdictClassname(activatorsClassNamesizeof(sClassName))
    
//&& StrContains(sClassName, "weapon_") != -1
    //&& GetEntPropEnt(activator, Prop_Send, "m_hOwnerEntity") == -1)
    
)
    {
        
PrintToChatAll("Touched by: %s"sClassName);
        
//RemoveEdict(activator);
    
}

When running through the trigger, it displays "Touched by: player" correctly, but when dropping my weapon into it, it just doesn't do anything at all. Is there something i'm missing? Wrong spawnflags?
__________________
Peace-Maker is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 03-18-2011 , 13:38   Re: trigger_multiple trigger for weapons?
Reply With Quote #2

Might be weapons aren't considered as anything that can trigger.
Try it with spawnflag 8 and see if normal props vs. weapons trigger it.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-18-2011 , 18:33   Re: trigger_multiple trigger for weapons?
Reply With Quote #3

With spawnflags set to 8 i'm no longer triggering it, when walking through it, but a weapon still doesn't either.
__________________
Peace-Maker is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 03-19-2011 , 09:40   Re: trigger_multiple trigger for weapons?
Reply With Quote #4

And do normal props trigger it while in that mode? (Like prop_physics or prop_dynamic)
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 12-09-2019 , 09:46   Re: trigger_multiple trigger for weapons?
Reply With Quote #5

@Peace-Maker did you ever get around finding a way to detect trigger_multiple by weapons?
__________________
ImACow is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-09-2019 , 11:41   Re: trigger_multiple trigger for weapons?
Reply With Quote #6

I don't remember, sorry :/
__________________
Peace-Maker is offline
Reply


Thread Tools
Display Modes

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 04:26.


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