How to switch frames??

Non-platform specific questions.

How to switch frames??

Postby ZonikStrike » Sun Dec 19, 2010 3:12 pm

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
ZonikStrike
 
Posts: 4
Joined: Sun Dec 19, 2010 3:01 pm
Score: 0 Give a positive score

Re: How to switch frames??

Postby jimmynewguy » Sun Dec 19, 2010 3:36 pm

its animpos++; so you weren't too far off. Just make sure under create actor you have the animationdirection set to stopped :)
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: How to switch frames??

Postby ZonikStrike » Sun Dec 19, 2010 3:47 pm

Thanx :D
ZonikStrike
 
Posts: 4
Joined: Sun Dec 19, 2010 3:01 pm
Score: 0 Give a positive score

Re: How to switch frames??

Postby ZonikStrike » Sun Dec 19, 2010 4:28 pm

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?
ZonikStrike
 
Posts: 4
Joined: Sun Dec 19, 2010 3:01 pm
Score: 0 Give a positive score

Re: How to switch frames??

Postby jimmynewguy » Sun Dec 19, 2010 5:26 pm

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
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: How to switch frames??

Postby ZonikStrike » Sun Dec 19, 2010 7:17 pm

jimmynewguy, thx, you're my saviour) :D
ZonikStrike
 
Posts: 4
Joined: Sun Dec 19, 2010 3:01 pm
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest