Page 1 of 1

draw from actor *

PostPosted: Fri Jun 25, 2010 6:50 pm
by DST
is there any way to draw from clones?

i tried using Actor* with getclone2, but it draws nothing.
i tried using char[] with sprintf/strncat but it draws nothing.

I need to draw 10 clones with their current animpos, but i can't seem to use anything there but const*actorname which doesn't allow me to use anything but the original actor.

Re: draw from actor *

PostPosted: Fri Jun 25, 2010 8:30 pm
by Hblade
Why not just make 10 actors each using the Inheret Events from capability :3

Re: draw from actor *

PostPosted: Fri Jun 25, 2010 8:34 pm
by DST
because then i'd still have to cast the actor into the draw from, which i can't do using strings, so then i'd have 10 drawfrom lines, which isn't practical.

When you go to change something, you don't want to have to change 10 of them. For instance, the actors all draw to a different scale, that i may want to change later on. You have to think about what will happen when you go to polish your game - will you be able to? or will your steps be slow and clunky?

The question here really is, can draw_from be made so it can be used in a loop?

Re: draw from actor *

PostPosted: Fri Jun 25, 2010 8:45 pm
by skydereign
Are you using clonename? If I remember properly you can use clonename for draw_from. So using getClone2 you can use it in a loop.

Re: draw from actor *

PostPosted: Sat Jun 26, 2010 1:09 am
by DST
yep, that works. thanks.

draw_from(getclone2("actor", i)->clonename, x, y, 1);