Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide projectile pointer to config function #197

Closed
szapp opened this issue Oct 11, 2019 · 1 comment
Closed

Provide projectile pointer to config function #197

szapp opened this issue Oct 11, 2019 · 1 comment

Comments

@szapp
Copy link
Owner

szapp commented Oct 11, 2019

Since the projectile is not accessible from the config functions as far, provide its pointer temporarily in a global variable. This way the function signatures remain untouched and backward compatibility to previous GFA versions is ensured.

Features that will benefit from this:

  • Custom collisions
  • Reusable projectiles
  • Critical hits
@szapp
Copy link
Owner Author

szapp commented Oct 12, 2019

Config functions concerning draw force, accuracy, and recoil are excluded, because the projectile has not left the shooter. It's properties (like position or instance) are thus trivial to infer.

The config function dealing with initial base damage is the only shooting related function where the projectile pointer is provided The other config functions mentioned above can be called from this function. This offers - for example - to attach an effect to the projectile depending on the accuracy.

@szapp szapp closed this as completed Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant