I have an event that is working correctly when fired, however I wanted to convert it to a function. Normally this is not a problem, however it does to seem to be able to access object variables when being called from the function. (I did check, the function is being called).
For a “work around” I can add this logic to an external event and link it when it need to be fired, but I feel a function would be best.
- projectiles (contains sprite objects)
- usable_weapons (contains sprite objects with variables (all the same variables))
Code that is working in the event
Same code but as a function and not working