Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Custom fire patterns for weapons. #24

@DreamyCecil

Description

@DreamyCecil

Pre-load and compile scripts related to fire and fire patterns and store them in action lists of CWeaponStruct.

Execute in Fire() or AltFire() procedures within a wait() block that will wait for the returning event from the script (it will use a callback function with specific CPlayerWeapon entity ID as a reference that sends EFinishFiring or similar event to it).
To prevent weapons from being stuck in the procedure, check if the script has been executed correctly and release the weapon from the wait() block if not.

Alternatively have a pre-defined fire speed (in the weapon config) that can also have a random time variable.
Example:

"FireTime" : 1.0,
"FireTimeRND" : 0.2,
"AutoSuspendFire" : true,
This will set wait time between 1.0 and 1.2 in a special variable that's also passed by value into the script before execution.
If the script is still running when the waiting ends, its thread should be suspended automatically unless "AutoSuspendFire" or similar option is set to false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    conceptFeature concept or ideastopic:addonsRelated to dynamically loaded user-created addonstopic:customizationRelated to mod customizationtopic:weaponsRelated to player's weapons

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions