SendNetworkEvent LIFO order?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

SendNetworkEvent LIFO order?

Post by gwHero »

Hi, I have a question about SendNetworkEvent (ZScript):

In my custom Menu class there is a special occasion that I have to send 2 network events. It is important that 1 event is processed before the other one.
To be absolutely sure I could process each in separate event handlers with different SetOrder (do not really like this solution), or queue one of the events and process the second one a tic later (like this solution more).
[Edit: third solution would be concatenating the strings with a delimiter and splitting them when processing afterwards]

But at this moment I don't need these solutions: I simply send the event that should be processed first AFTER the other one, because it seems that they are presented to NetworkProcess in LIFO (last in, first out) order. My question is: could I rely on this behaviour in future GZDoom releases or would it be more safe to implement the queuing mechanism?

Thanks in advance!
Post Reply

Return to “Scripting”