Pages: 1
Topic closed
working on a program and I want the sprite costume 1 to change to costume 2 when the mouse pointer touches it THEN back to costume 1 when the mouse pointer moves away.
Need help with script please
Offline
I believe this will do what you want:
Offline
naduking wrote:
working on a program and I want the sprite costume 1 to change to costume 2 when the mouse pointer touches it THEN back to costume 1 when the mouse pointer moves away.
Need help with script please
>> The scripting in the comment above will work as you want. If you want to try some other effects then try leaving the costume the same but where (in the script above) the costume is set, use "ghost" or "brightness" values from the looks palette. This can be used on menu buttons, where if the mouse is touching the button, "set brightness to 0", else "set brightness -10".
if you want to continue this further by adding clickable functionality (so something happens when the sprite is clicked), add an "if" loop inside the "If - touching mouse pointer" and then the function (broadcast start game for example). This means you can have compact scripts and that the *broadcast start game* block will only happen IF its touching the mouse pointer + the mouse is clicked.
Hope this helps you futher!!
Prestige
Offline
Feey1 wrote:
Hi. I'm trying to get my Script to change to costume a when I click on my 2nd Sprint. Please tell me how to do so.
I believe this is what you're looking for:
First Sprite: When Sprite1 clicked Broadcast "clicked" Second Sprite: When I receive "clicked" Next Costume
Hope that helps you!
Offline
Feey1 wrote:
It kind of. The problem is I can't find the buttons to do that. Please tell me what category Broadcast "clicked" is?
In the orange control section...
Offline
Feey1 wrote:
It kind of. The problem is I can't find the buttons to do that. Please tell me what category Broadcast "clicked" is?
It's this block, in the Control section.
Last edited by Harakou (2011-06-15 22:58:49)
Offline
Topic closed
Pages: 1