Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Revisions: Issue #1794 All Revisions ] Back to Issue ]
Summary 0001794: New script type EVENT
Revision 2014-05-04 19:39 by Torr Samaho
Description When thinking how mods can do stats tracking now that we have a persistent data storage, I realized how difficult it is to figure out if a certain event happened via ACS. So I added the new experimental script type EVENT. By calling EVENT scripts the engine can notify a mod that a noteworthy event happened and also provide some information about it.

So far I only implemented one event, PLAYERFRAGS, as proof of concept. The mod can declare an event script (needs new ACC, source here) as follows:

Script 11 (int type, int dataone, int datatwo ) EVENT


'type' is the event type as integer, e.g. PLAYERFRAGS=0. The activator, 'dataone' and 'datatwo' encode additional information about the event. For instance, the activator of PLAYERFRAGS is the fragging player and dataone is the number of the fragged player. For this event, datatwo is not needed and always zero.

This ticket is intended to collect ideas on what kind of events are necessary. For instance, there are many CTF related events that would be important for stats tracking, like "player captures the flag" and "player returns the flag".

The idea of events is not limited to stats tracking know. It would make sense to have events for all things that a mod needs to know. For instance, one could have "round starts" and "round ends" events.
Revision 2014-05-04 19:37 by Torr Samaho
Description When thinking how mods can do stats tracking now that we have a persistent data storage, I realized how difficult it is to figure out if a certain event happened via ACS. So I added the new experimental script type EVENT. By calling EVENT scripts the engine can notify a mod that a noteworthy event happened and also provide some information about it.

So far I only implemented one event, PLAYERFRAGS, as proof of concept. The mod can declare an event script (needs new ACC, source here) as follows:

Script 11 (int type, int dataone, int datatwo ) EVENT


'type' is the event type as integer, e.g. PLAYERFRAGS=0. The activator, 'dataone' and 'datatwo' encode additional information about the event. For instance, the activator of PLAYERFRAGS is the fragging player and dataone is the number of the fragged player. For this event, datatwo is not needed and always zero.

This ticket is intended to collect ideas on what kind of events are necessary. For instance, there are many CTF related events that would be important for stats tracking, like "player captures the flag" and "player returns the flag".






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker