Description | EVENT type scripts currently accept a range of predefined event types that can be triggered, which fills in the gap of a lot of events that might happen during the map. With Zandronum's growing capabilities and ACS becoming more complex with each mod, having the ability to abstract code away and prevent tightly coupled code is a must. Sadly, apart from this EVENT script and its limited features, there's no way to do this manually, and you are depending on what is provided.
My suggestion is to provide a way to create custom script types that can be invoked manually, allowing mods to provide a way to invoke scripts implemented by maps or patches. This avoids coupling the code, and is a perfect way to create scripts that depend on a certain event to play.
A good example could be Zombie Horde. You create a map that depends on a player to be infected, so Zombie Horde implements the INFECT event type, and invokes a new type of method that could specify the behaviour to start these types of scripts. Then it is up to the map to define a script with this type. Currently, it would require a constant loop iterating all players, saving their state, and comparing it with the next state to see if they got infected at that point. It's cumbersome and unnecessary. |