Adventure Game Studio

AGS Development => Editor Development => Topic started by: Dave Gilbert on Fri 23/12/2016 17:44:09

Title: Feature request - name loops
Post by: Dave Gilbert on Fri 23/12/2016 17:44:09
Pardon me if this is the wrong place to put this.

In my current game, all my characters have 50+ animation loops thus far and it got so complex I had to create a function for each animation so I could keep track of them properly. This has added a lot of coding to my project, but I figure that could be eliminated if we could name loops the same way we can name views.

For example, ifI have a character named Eli I named his view "vEli", which makes his view easy to refer to in script. But he has a jump animation which is loop 45 and I have to remember that number every time I want to make him jump. It would be nice to be able to name his loop "eliJump" (or something better) and refer to it like this:

cEli.Animate(eliJump, 4, eOnce, eBlock, eForward);

Is such a thing possible?

Happy Holidays!

-Dave
Title: Re: Feature request - name loops
Post by: cat on Fri 23/12/2016 17:57:46
Wouldn't it be easier to have a vEliJump view? At least, that's what I do.

And Happy Holidays to you as well!
Title: Re: Feature request - name loops
Post by: Dave Gilbert on Fri 23/12/2016 18:00:30
Wouldn't that add lots of unnecessary steps?

You'd have to change the view, then play the animation, and then change it back. I keep all the animation loops on the same view for that reason.
Title: Re: Feature request - name loops
Post by: cat on Fri 23/12/2016 18:03:56
Ah, that's why!
Title: Re: Feature request - name loops
Post by: Retro Wolf on Fri 23/12/2016 18:26:55
You could try definitions, In the Global header:

Code (ags) Select
#define jumpLoop 45
Title: Re: Feature request - name loops
Post by: Dave Gilbert on Fri 23/12/2016 18:54:48
Oh yeah. I already do something similar, but having to do that for every single animation loop is a bit time consuming. It would save a lot of time to name those loops right from the View panel. By, for example, double-clicking on the loop number and a text field pops up.
Title: Re: Feature request - name loops
Post by: Crimson Wizard on Fri 23/12/2016 21:37:24
I think it may be possible to make this on Editor-side only, which would result in same macro solution as Retro Wolf suggested, just automatically generated.
Title: Re: Feature request - name loops
Post by: Cassiebsg on Fri 23/12/2016 22:00:02
Sounds great to me! :) (nod)
Doesn't even need to be a popup box, just a box in front of the Loop... sweet if it gets done! (nod)