Page 1 of 1

PC Won't listen

PostPosted: Sat Feb 09, 2008 3:37 pm
by thunderios
I had to create a game for school, a quiz.
After you got five points you should go to the next stage
I have got everything working the Score actor, added score if u answer right
Now the camara should move to (2,2)
first I used:
"
if(Score.textNumber = 5) view.y = 2;
if(Score.textNumber = 5) view.x = 2;
"
There were no errors, but if I get my score to 5 it won't work, what should I do?

Re: PC Won't listen

PostPosted: Sat Feb 09, 2008 3:47 pm
by regine
Try this:

if(Score.textNumber == 5)
{
view.y = 2;
view.x = 2;
}

Re: PC Won't listen

PostPosted: Sat Feb 09, 2008 3:56 pm
by thunderios
Sorry, that does not work either.
Is there something wrong with my Score Actor then?
Or shouldn't I use x and y?
Maybe I can use an event instead of a code...

Re: PC Won't listen

PostPosted: Sat Feb 09, 2008 4:01 pm
by regine
Make sure, that you did do that:

Actor Control -> Add -> Draw Actor -> Script Editor -> Enter the Script

Re: PC Won't listen

PostPosted: Sat Feb 09, 2008 4:11 pm
by thunderios
It still doesn't work...
Do I have to do Actor Control -> Add -> Draw Actor -> Script Editor -> Enter the Script at
the score, the view, or something else?

If it still does not work, I think I can make a button 'to the next level' or something...

Anyway thanks for you time

Re: PC Won't listen

PostPosted: Sat Feb 09, 2008 4:15 pm
by regine
Here is a demo:

Re: PC Won't listen

PostPosted: Sat Feb 09, 2008 5:00 pm
by regine
Corrected edition:

Re: PC Won't listen

PostPosted: Sat Feb 09, 2008 6:16 pm
by thunderios
regine helped me well, topic can be closed