-
Navi Specialist
mc responding to inputted messages?
i was just wondering if i could make an mc respond to inputted words by users such as: inputted text: walk
Mc: will start walking.
-
Guess it could be done!
You would have to have some constantly looping control movie clip, checking the value of the input text box, and then have the movie clip reacting accordingly.
-
Navi Specialist
could you explain some funtions that might help me? or any codes?
-
Navi Specialist
im not sure but is double posting allowed?
-
Navi Specialist
old newbie you there? can someone give me a link to where i might be able to find help?
-
-Iron Myk-
well, suppose your input text box has an instance name of "action"
on your movie clip that you want to respond:
Code:
onClipEvent(enterFrame) {
if (_root.action.text.toLowerCase() == "walk") {
gotoAndPlay("walk");
_root.action.text = "";
}else{
if (_root.action.text.toLowerCase() == "jump") {
gotoAndPlay("jump");
_root.action.text = ""
}
}
this would kinda work, i guess.. All theory.. I added the _root.action.text="" , otherwise, everyframe pass the MC would go back to the specified frame label without completing the animation..
i'm sure somebody will come along with some cleaner code, but this should at least help in getting started..
good luck
-myk
-
Navi Specialist
hmm i tested this to work like making a password and it seems to work well. I'm thinking i'll keep at the password thing until i come up with errors then i'll try your way.
my problem is getting him to move a direction. See i'm trying to get the hero to do everything by itself, but you can help out by telling it some stuff to do.
i'm also wondering how i can make him say something if he doesn't recognize what u typed in.
Last edited by NewbieMaster; 08-06-2003 at 03:55 PM.
-
Navi Specialist
how can make the hero say something if he doesn't recognize what you typed in.
-
Angry Panda
i suppose after all of the other ifs and elses to recognize certain words you could have the last else goto and play a parked movie clip that has the hero speaking...the way im thinking of it it would work, but could we see what youre trying to do?
-
Navi Specialist
hmm but the parked hero is of him in a stance and i need each attack to go back to it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|