Reading a clone's variable?

Talk about making games.

Reading a clone's variable?

Postby Game A Gogo » Fri Jun 13, 2008 6:56 pm

How? I used this:
Code: Select all
int i;
Actor*Clone;
erase(0,0,0,0);
setpen(0,128,256,0,2);
putpixel(Player.x/200+(width/2),Player.y/200+(height/2));
setpen(128,128,128,0,1);
for(i=0; i<ActorCount("Block"); i++)
{
    Clone=GetClone2("Block",i);
    putpixel(Clone.x/200+(width/2), Clone.y/200+(height/2));
}

but it doesn't work...
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Reading a clone's variable?

Postby makslane » Fri Jun 13, 2008 8:37 pm

Use Clone->x, not Clone.x
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Reading a clone's variable?

Postby Game A Gogo » Fri Jun 13, 2008 8:41 pm

ah, thanks a lot!
I didn't really got that section of GetClone2 lol...

it's really a burden when you are waiting to get help and that you have programming crave like this one xD I always get it during summer :3
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron