what exactly can be done in a EntityPostHook/TempEntityPostHook?
because shouldnt the memory be locked at that point?
what is a EntityPostHook
Re: what is a EntityPostHook
Post hooks are getting called after the hooked function has been executed, but before it returns to the caller. That allows for example reading and modifying the return value of the hooked function.
Entity<type>Hook is basically just a helper to hook functions on entities. TempEntity<type>Hook hooks the Create method of temporary entities (effect entities). Thus, it allows you to do stuff right before a temp entity has been created and right after it has been created.
What exactly do you mean with the memory being locked?
Entity<type>Hook is basically just a helper to hook functions on entities. TempEntity<type>Hook hooks the Create method of temporary entities (effect entities). Thus, it allows you to do stuff right before a temp entity has been created and right after it has been created.
What exactly do you mean with the memory being locked?
Re: what is a EntityPostHook
thanks. that underlines the temporal meaning of pre/post.
but where is the technical use of post hooking in tempentites.create()? and shouldnt the method here better be called .send() ? what can be done in or more specific WITH the posthook here, that cant be done in a prehook already or simply by adding custom code to the next line in the pythoncode?
i imagine the whole process for a tempentity sthn like this :
load te template ,create sendtable, create recipient object, PREHOOK send client netchannel POSTHOOK.
with memory locked i meant, that in my described scheme, there shouldnt be any more access in the posthook to modify the sendtable,template or recipiend object, after it has been sent. only the prehook can access these objects. at least thats what i would imagine. but when i try to test these assumptions i always get unicode decoding error when accessing the tempentity in a POSTHOOK. does it work for you?
but where is the technical use of post hooking in tempentites.create()? and shouldnt the method here better be called .send() ? what can be done in or more specific WITH the posthook here, that cant be done in a prehook already or simply by adding custom code to the next line in the pythoncode?
i imagine the whole process for a tempentity sthn like this :
load te template ,create sendtable, create recipient object, PREHOOK send client netchannel POSTHOOK.
with memory locked i meant, that in my described scheme, there shouldnt be any more access in the posthook to modify the sendtable,template or recipiend object, after it has been sent. only the prehook can access these objects. at least thats what i would imagine. but when i try to test these assumptions i always get unicode decoding error when accessing the tempentity in a POSTHOOK. does it work for you?
Re: what is a EntityPostHook
I don't have a specific use case for you, because I never used it before. It's called "create", because it's leant on the engine's name.D3CEPTION wrote:but where is the technical use of post hooking in tempentites.create()? and shouldnt the method here better be called .send() ? what can be done in or more specific WITH the posthook here, that cant be done in a prehook already or simply by adding custom code to the next line in the pythoncode?
D3CEPTION wrote:with memory locked i meant, that in my described scheme, there shouldnt be any more access in the posthook to modify the sendtable,template or recipiend object, after it has been sent. only the prehook can access these objects. at least thats what i would imagine. but when i try to test these assumptions i always get unicode decoding error when accessing the tempentity in a POSTHOOK. does it work for you?
Since a delay can be passed to the "Create" method, you might still be able to modify the temp entity in a post hook.
If you want me to test anything, please provide the output of "sp info" and copy and paste-able code that reproduces the error you are facing.
Who is online
Users browsing this forum: No registered users and 14 guests