https://github.com/coelckers/gzdoom/pull/59
Here's a Build with this feature and a test PK3 showing how each function is used (prepare for chaos!): http://www.mediafire.com/download/caix4 ... s_Test.zip
Here's some information on the properties and flags.
Decorate:
Code: Select all
Properties:
DeathScript "Script Name", arg1, arg2, arg3, arg4 // Death script for actor and it's args.
Setting the script name to "Default" forces the actor to use the default death script, useful when inheriting from an actor that uses a non-default death script.
Setting the script name to "None" makes the actor not fire any death scripts whatsoever, as long as +BOTHDEATHSCRIPTS hasn't been defined.
Action Functions:
A_SetDeathScript("Script Name") // Sets the actor's death script
A_SetDeathScriptArg(int pos, int value) // Sets the actor's death script args
A_SetDefaultDeathScriptArg(int pos, int value, bool clear) // Overrides the default death script args, if clear is true, value is ignored and the override is removed.
Flags:
+BOTHDEATHSCRIPTS // Makes the actor fire both it's own death script, and the global default.
Code: Select all
DefaultDeathScript = "Script Name", arg1, arg2, arg3, arg4 // Sets a default death script to fire for killable objects (monsters/shootables) without a death script defined.
The default death script fires for all objects that can be shot and killed. Not just monsters. If you want to have your script not do anything for non-monsters, do a CheckFlag(0, "ISMONSTER"); check in your ACS Script.