Your code doesn't work because gimme_a_return returns a value when it hits the wait. This is "by design" and makes logic sense.

Using global vars is an okay solution but, if this is a entity function, I would suggest using one of the entity skills/flags instead (so you can call the function more than once).

However, if people need a better solution, a "call and wait" command might be an interesting idea for a feature request.


Conitec's Free Resources:
User Magazine || Docs and Tutorials || WIKI