Can a python function create and return an ATL transform?
Posted: Sat Aug 20, 2016 6:20 pm
So i'm creating a tile based strategy game. each tile is marked by a waypoint (basically it's xpos and ypos). The path is a list of these waypoints that each unit moves between. Obviously there is a bit more to it than that, but that's the general overview.
Here's my problem:
I have a generator that determines all the possible routes a unit can take, records them and picks the most efficient route. However that route can have infinite changes of direction. Now usually i'd use a for loop to account for an infinite combination of N, S, E, W moves, but ATL doesn't accept for loops and it's like, nor can you alter variables passed to it in any meaningful way like you can in functions. This effectively limits your transforms to a pre-determined number of changes in direction since you can't put any type of generator in them.
Here's my question:
Is it possible to use a python function to instantiate an ATL transform and return it?
Here's my problem:
I have a generator that determines all the possible routes a unit can take, records them and picks the most efficient route. However that route can have infinite changes of direction. Now usually i'd use a for loop to account for an infinite combination of N, S, E, W moves, but ATL doesn't accept for loops and it's like, nor can you alter variables passed to it in any meaningful way like you can in functions. This effectively limits your transforms to a pre-determined number of changes in direction since you can't put any type of generator in them.
Here's my question:
Is it possible to use a python function to instantiate an ATL transform and return it?