Page 1 of 1

How to switch frames??

PostPosted: Sun Dec 19, 2010 3:12 pm
by ZonikStrike
How to make actor to switch frames on key down event? Actor Control>Add>Key Down>Right (Repeat Disable)>Script Editor and what next? I tried "frame++;" but nothing happens =/ Yah, I know that may be a noobish question, but please help me :(
Sorry for my bad english

Re: How to switch frames??

PostPosted: Sun Dec 19, 2010 3:36 pm
by jimmynewguy
its animpos++; so you weren't too far off. Just make sure under create actor you have the animationdirection set to stopped :)

Re: How to switch frames??

PostPosted: Sun Dec 19, 2010 3:47 pm
by ZonikStrike
Thanx :D

Re: How to switch frames??

PostPosted: Sun Dec 19, 2010 4:28 pm
by ZonikStrike
Don't wanna do a new topic, but I've got another problem. I have two text actors, and one of them is increasing when Right is pressed and decreasing when Left is pressed. I need it not to be greater than another but not to be lower than zero, so if it's zero and I press Left, it'd be still zero, and if it's equal to another and I press Right, it'd remain the same. How to do it? :?: Any ideas?

Re: How to switch frames??

PostPosted: Sun Dec 19, 2010 5:26 pm
by jimmynewguy
on key down -> left -> script editor
Code: Select all
if(textNumber>0)textNumber--;

on key down -> right -> script editor
Code: Select all
if(textNumber<25)textNumber++;
just change 25 to that other number

Re: How to switch frames??

PostPosted: Sun Dec 19, 2010 7:17 pm
by ZonikStrike
jimmynewguy, thx, you're my saviour) :D