alphappy / TAMacro

WIP macro/TAS tool for Rain World Remix
1 stars 1 forks source link

Make macros non-static #7

Open alphappy opened 4 months ago

alphappy commented 4 months ago

Currently, macros are static; if macro A executes itself (once, not endlessly), it resets its own state. For example, the following macro only runs R~20 once, regardless of where Slugcat starts. If non static, it would run R~20 once for every L~20.

/NAME: foo
L~20
>goto 1 if scug located left of 500
>execute foo
>label 1
R~20
RPink47 commented 1 week ago

This would probably be done by making a callstack as mentioned in #11

alphappy commented 1 week ago

This would probably be done by making a callstack as mentioned in #11

There already is a callstack, it's just that there is only one copy of each macro and it gets reinitialized each time a macro is called. #11 would just make the callstack visible to the user.