Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when getting transform state for At.render() that has ATL transform function with around (and maybe other) statements. #719

Closed
XelaPy opened this issue Aug 16, 2015 · 1 comment

Comments

@XelaPy
Copy link
Contributor

XelaPy commented Aug 16, 2015

I also sometimes get unsupported operation errors with similar setups. There are workaround, but it would be nice to get this to work properly... Original code setup was a LOT longer but I narrowed the error down.

It's not providing the same arguments as statements, I tried changing them to unique names and nothing changed.

transform vortex_particle(t=10, around=(config.screen_width/2, config.screen_height/2), angle=0, radius=200, circles=3):
    subpixel True
    anchor (0.5, 0.5)
    around around
    angle angle
    radius radius
    linear t radius 0 clockwise circles circles

label start:
    show expression At(Solid("F00", xysize=(20, 20)), vortex_particle())
    pause
    return

I'm sorry, but an uncaught exception occurred.

Executing ATL code at game/script.rpy:13
File "game/script.rpy", line 58, in script
show expression At(Solid("F00", xysize=(20, 20)), vortex_particle())
TypeError: 'Solid' object is not iterable

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "game/script.rpy", line 58, in script
show expression At(Solid("F00", xysize=(20, 20)), vortex_particle())
File "D:\Coding\Dropbox\Dev\RenPy\renpy\ast.py", line 1053, in execute
show_imspec(self.imspec, atl=getattr(self, "atl", None))
File "D:\Coding\Dropbox\Dev\RenPy\renpy\ast.py", line 1025, in show_imspec
atl=atl)
File "D:\Coding\Dropbox\Dev\RenPy\renpy\exports.py", line 551, in show
sls.add(layer, img, key, zorder, behind, at_list=at_list, name=name, atl=atl, default_transform=renpy.config.default_transform, transient=transient)
File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\core.py", line 854, in add
thing._show()
File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\motion.py", line 932, in _show
super(ATLTransform, self)._show()
File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\motion.py", line 916, in _show
self.update_state()
File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\motion.py", line 773, in update_state
fr = self.function(self, self.st, self.at)
File "D:\Coding\Dropbox\Dev\RenPy\renpy\atl.py", line 503, in execute
action, arg, pause = block.execute(trans, timebase, self.atl_state, event)
File "D:\Coding\Dropbox\Dev\RenPy\renpy\atl.py", line 691, in execute
action, arg, pause = stmt.execute(trans, target - start, child_state, event)
File "D:\Coding\Dropbox\Dev\RenPy\renpy\atl.py", line 1048, in execute
setattr(newts, k, v)
File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\motion.py", line 291, in set_around
self.xaround, self.yaround = value
TypeError: 'Solid' object is not iterable

Windows-8-6.2.9200
Ren'Py 6.99.5.602
Meow 0.0

@XelaPy
Copy link
Contributor Author

XelaPy commented Aug 16, 2015

*I've found a very simple workaround by simply adding the displayable as a parameter to the transform function itself, it does it's job perfectly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant