My idea is to create a idling character (moving left and right) if left alone (no input from the user using mouse or keyboard) for more then 10 seconds (timer).
Then if there is a user input (say the user moves the mouse over the character), the character comes alive and do some dance. However after the dance is completed and AGAIN the user leaves it alone with no input, it goes into a idling mode again (moving left and right).
Help/guide to create this is much appreciated.
Thanks
Offline
c3ntaur wrote:
My idea is to create a idling character (moving left and right) if left alone (no input from the user using mouse or keyboard) for more then 10 seconds (timer).
Then if there is a user input (say the user moves the mouse over the character), the character comes alive and do some dance. However after the dance is completed and AGAIN the user leaves it alone with no input, it goes into a idling mode again (moving left and right).
Help/guide to create this is much appreciated.
Thanks![]()
well, i have to know what buttons are your controls.
but for basic, (Up,left,down,right) here is the script:
<when green flag clicked><forever><if><< <not> >><key[ Right<< <or> >> ]pressed?><< <not> >><key[ left<< <or> >> ]pressed?><key[ up ]pressed?><wait( 10 )secsc><switch to costume[ waiting1<wait( 0.1)secsc><switch to costume[ waiting2<wait( 0.1)secsc><switch to costume[ waiting3<wait( 0.1)secsc><switch to costume[ waiting4<wait( 0.1)secsc><switch to costume[ waiting5<( <wait( 0.1)secsc>
Offline
use variables. I'm using a fighting game which I am sure you could interpret into what you need- I have a Forever If block. I also have a variable called idle. Now you decide when you set it to 1. When a key (or mouseover) is pressed, it set idle to 0. Now if idle equals 1, you need to have an idling script.
Offline
zawicki1fromyoutube wrote:
c3ntaur wrote:
My idea is to create a idling character (moving left and right) if left alone (no input from the user using mouse or keyboard) for more then 10 seconds (timer).
Then if there is a user input (say the user moves the mouse over the character), the character comes alive and do some dance. However after the dance is completed and AGAIN the user leaves it alone with no input, it goes into a idling mode again (moving left and right).
Help/guide to create this is much appreciated.
Thanks![]()
well, i have to know what buttons are your controls.
but for basic, (Up,left,down,right) here is the script:
<when green flag clicked><forever><if><< <not> >><key[ Right<< <or> >> ]pressed?><< <not> >><key[ left<< <or> >> ]pressed?><key[ up ]pressed?><wait( 10 )secsc><switch to costume[ waiting1<wait( 0.1)secsc><switch to costume[ waiting2<wait( 0.1)secsc><switch to costume[ waiting3<wait( 0.1)secsc><switch to costume[ waiting4<wait( 0.1)secsc><switch to costume[ waiting5<( <wait( 0.1)secsc>
Basically, when I press the Up,down,left, right keyboard input, the character moves according. When I do a mouse over, the character is suppose to change costume and when the i click on the character, it is suppose to move to another designated place and return to the original spot after completing the task there.
The problem i face now is that the idling part seems to be done... and I am moving on to the second part.. which is the character changing costume when I do a mouse over (mouse-pointer touching) BUT how do I make the character change to another costume on the spot and not have to move to another place (i donno why is moves slightly OFF the screen.. i do not have any other quote which needs the mouse to move off screen) when it needs to change its costume.
basically... the character does 2 things... when mouse over, it changes costume on the spot whereever it is... if clicked... it moves to another location to do some task and return to the original spot after it is done... then IF there is no input from the user (either by keyboard or mouse over/click) the character idles and move left and right UNTIL the user clicks on it or do a mouse over it and it proceeds to do the task again....
any1 can help me with this scripting? im getting it all messed up. thanks~!
Offline
Bluestribute wrote:
use variables. I'm using a fighting game which I am sure you could interpret into what you need- I have a Forever If block. I also have a variable called idle. Now you decide when you set it to 1. When a key (or mouseover) is pressed, it set idle to 0. Now if idle equals 1, you need to have an idling script.
possible for me to take a look at your work/quotes? so that I have a better idea? thanks
Offline
c3ntaur wrote:
zawicki1fromyoutube wrote:
c3ntaur wrote:
My idea is to create a idling character (moving left and right) if left alone (no input from the user using mouse or keyboard) for more then 10 seconds (timer).
Then if there is a user input (say the user moves the mouse over the character), the character comes alive and do some dance. However after the dance is completed and AGAIN the user leaves it alone with no input, it goes into a idling mode again (moving left and right).
Help/guide to create this is much appreciated.
Thanks![]()
well, i have to know what buttons are your controls.
but for basic, (Up,left,down,right) here is the script:
<when green flag clicked><forever><if><< <not> >><key[ Right<< <or> >> ]pressed?><< <not> >><key[ left<< <or> >> ]pressed?><key[ up ]pressed?><wait( 10 )secsc><switch to costume[ waiting1<wait( 0.1)secsc><switch to costume[ waiting2<wait( 0.1)secsc><switch to costume[ waiting3<wait( 0.1)secsc><switch to costume[ waiting4<wait( 0.1)secsc><switch to costume[ waiting5<( <wait( 0.1)secsc>Basically, when I press the Up,down,left, right keyboard input, the character moves according. When I do a mouse over, the character is suppose to change costume and when the i click on the character, it is suppose to move to another designated place and return to the original spot after completing the task there.
The problem i face now is that the idling part seems to be done... and I am moving on to the second part.. which is the character changing costume when I do a mouse over (mouse-pointer touching) BUT how do I make the character change to another costume on the spot and not have to move to another place (i donno why is moves slightly OFF the screen.. i do not have any other quote which needs the mouse to move off screen) when it needs to change its costume.
basically... the character does 2 things... when mouse over, it changes costume on the spot whereever it is... if clicked... it moves to another location to do some task and return to the original spot after it is done... then IF there is no input from the user (either by keyboard or mouse over/click) the character idles and move left and right UNTIL the user clicks on it or do a mouse over it and it proceeds to do the task again....
any1 can help me with this scripting? im getting it all messed up. thanks~!
Sorry...I thought you meant an idle stance. (like if you wait 10 seconds he will start tapping his foot)
Offline
I will remember that when I make a game.
Offline
c3ntaur wrote:
Bluestribute wrote:
use variables. I'm using a fighting game which I am sure you could interpret into what you need- I have a Forever If block. I also have a variable called idle. Now you decide when you set it to 1. When a key (or mouseover) is pressed, it set idle to 0. Now if idle equals 1, you need to have an idling script.
possible for me to take a look at your work/quotes? so that I have a better idea? thanks
![]()
Umm… sure I guess. I actually made it to help someone else. I guess there is no harm in uploading tomorrow
Offline