Help me to solve this problem, please!

Non-platform specific questions.

Help me to solve this problem, please!

Postby Pietro Italy » Sun Dec 23, 2007 9:29 pm

I have a little problem in script editor, I'm making a game with diamonds to collect. When you collide with a diamond, the counting of diamonds go to 1. I've put this code on destroy actor of the diamond:

rest2.textNumber = rest2.textNumber + 1;

But the rest2 (actor who counts the diamonds), has a clone, and I'd like to put the same event to its clone, so I put:

rest2.1.textNumber = rest2.1.textNumber + 1;

But the program doesn't consider .1 as a clone of rest2. Is there another way to do what I want, because this one didn't work. Thanks for help.
Do anybody else put your name?
My avatar is my côté fou
User avatar
Pietro Italy
 
Posts: 12
Joined: Sun Dec 16, 2007 1:02 pm
Location: Rio, the wonderful city, Brazil
Score: 0 Give a positive score

Re: Help me to solve this problem, please!

Postby makslane » Sun Dec 23, 2007 10:24 pm

Use the getclone2 function:
http://game-editor.com/forum/viewtopic.php?t=711

Code: Select all
getclone2("rest2", 0)->textNumber++;
getclone2("rest2", 1)->textNumber++;
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


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron