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

env_beam fires HookSingleEntityOutput callback only once


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 02-14-2016 , 20:28   env_beam fires HookSingleEntityOutput callback only once
Reply With Quote #1

So basiclly, my problem is that the callback in this code is only fired once. I need it to be called for every frame for every touch in order to play a sound when a player touches the 'beam'.
PHP Code:
HookSingleEntityOutput(iEnt"OnTouchedByEntity"MineLaser_OnTouchfalse); 
Think code from [Here]
SDK env_beam think code


As you can see, the part that messes up with the (next) think is this
Code:
        if( tr.fraction != 1.0 && PassesTouchFilters( tr.m_pEnt ) ) 
        { 
            m_OnTouchedByEntity.FireOutput( tr.m_pEnt, this, 0 ); 
            return; 
        }
Things I have tried:
I have tried to set the next think time using the following code:
PHP Code:
SetEntProp(iEntProp_Data"m_nNextThinkTick"GetGameTickCount()); 
I have also tried to reassign the TouchType value using DispatchKeyValue in MineLaser_OnTouch, but with no luck.

My plugin's code in case you're intrested


Any ideas?
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.

Last edited by pokemonmaster; 02-14-2016 at 20:33. Reason: Accidently posted before completing the formatting.. :/
pokemonmaster is offline
 



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 12:55.


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