Page 1 of 1

How do you draw a clone?

PostPosted: Sat Jun 02, 2012 11:53 pm
by SuperSonic
Ok, so I want to use the draw_from() function to draw a clone. I want the clone to be specified by my variable i. How do I do that? Here's what I mean:
Code: Select all
int i = 5;//Let's say I want to draw the fifth clone
draw_from(WhatDoIPutHere, 0, 0, 1);

Re: How do you draw a clone?

PostPosted: Sun Jun 03, 2012 12:36 am
by DarkParadox
Using this:
Code: Select all
int id_of_clone = 5;
//Number can be whatever.

char temp_string[10];
//This can be however long you need it to be...

sprintf(temp_string, "name_of_clone.%i", id_of_clone);
//Modifies the temp string to include the number specified in the integer, change "name_of_clone" to whatever actor you're attempting to draw.

draw_from(temp_string, 0, 0, 1);
//Draws the actor using the clones ID we set using sprintf.

Re: How do you draw a clone?

PostPosted: Sun Jun 03, 2012 12:53 am
by SuperSonic
Thank you very much. Plus 1 :wink: