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

Solved Detecting the moment of "trigger_" being triggered


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 10-22-2017 , 07:24   Detecting the moment of "trigger_" being triggered
Reply With Quote #1

As the title says, is there any way to detect the moment of "trigger_" being triggered, like "trigger_hurt" or "trigger_multiple".
Any help would be appreciated! Thanks

Last edited by TheWhitesmith; 10-23-2017 at 17:47.
TheWhitesmith is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 10-22-2017 , 07:46   Re: [HELP] Detecting the moment of "trigger_" being triggered
Reply With Quote #2

Triggers are usually triggered on either Touch or Use functions. You can hook both, search.
klippy is offline
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 10-22-2017 , 08:12   Re: [HELP] Detecting the moment of "trigger_" being triggered
Reply With Quote #3

I am aware of this, but sometimes there is a delay (using multimanager) so the "trigger_" is triggered after x seconds from using the button, that makes it hard to make a single plugin that works on every map.
TheWhitesmith is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-22-2017 , 10:35   Re: [HELP] Detecting the moment of "trigger_" being triggered
Reply With Quote #4

During FM_SetKeyValue retrieve for each trigger_hurt the "delay" keyvalue and remember that in a trie for example(use as key the trigger entity index converted to string). Then on touch/use retrieve the delay from the trie based on touched entity index. That way you know if it's going to be executed immediately or after some delay.
__________________

Last edited by HamletEagle; 10-22-2017 at 10:36.
HamletEagle is offline
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 10-23-2017 , 16:39   Re: [HELP] Detecting the moment of "trigger_" being triggered
Reply With Quote #5

Thank you Hamlet, that was the kind of help that I wanted.
TheWhitesmith is offline
Old 10-23-2017, 17:46
TheWhitesmith
This message has been deleted by TheWhitesmith. Reason: oh how dumb this reply was
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 18:22.


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