draw from actor *

Non-platform specific questions.

draw from actor *

Postby DST » Fri Jun 25, 2010 6:50 pm

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.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: draw from actor *

Postby Hblade » Fri Jun 25, 2010 8:30 pm

Why not just make 10 actors each using the Inheret Events from capability :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: draw from actor *

Postby DST » Fri Jun 25, 2010 8:34 pm

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?
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: draw from actor *

Postby skydereign » Fri Jun 25, 2010 8:45 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: draw from actor *

Postby DST » Sat Jun 26, 2010 1:09 am

yep, that works. thanks.

draw_from(getclone2("actor", i)->clonename, x, y, 1);
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron