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[], caller, activator, Float:delay)
{
decl String:sClassName[64];
if(IsValidEntity(activator)
&& IsValidEdict(activator)
&& GetEdictClassname(activator, sClassName, sizeof(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?
__________________