Closed twhitcomb closed 11 years ago
OnWeaponAssignment
isn't a boolean event though, you cannot say yes or no to the question being asked. OnWeaponAssignment
tells you which weapon the player is going to get and it gives you the option to change it. If you don't want to change it, you shouldn't return a value. If you want to change it you should return the weapon id you want them to have, or -1
to specify no weapon. -1
is the id of an invalid object, so it makes sense to return it in this case. The latest build I released broken the -1
return value, but it will be fixed in next one.
Makes sense; it doesn't matter either way, as long as it works :P
I would like to add a comment to this ticket.
OnWeaponAssignment gives every script access either to be edit or not without previous script's edited knowing. That's one of the downside. It would be nice to have one time edit for one script to use whilst other scripts can't (is available on different software for Halo).
All other functions with return values return booleans for allowing/disallowing certain events from occurring. This is the only event function which returns 0 or -1. It should instead return true or false to keep event functions consistent.