November 01, 2024, 12:33:37 AM
Welcome,
Guest
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
For WME related articles and tutorials visit
WME Resource Center
.
Home
Help
Search
Calendar
Login
Register
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Hotspot Animations
« previous
next »
Pages: [
1
]
Print
Author
Topic: Hotspot Animations (Read 3906 times)
0 Members and 1 Guest are viewing this topic.
noxis
Lurker
Karma: 0
Offline
Gender:
Posts: 32
Noxis Interactive
Hotspot Animations
«
on:
March 26, 2007, 03:31:50 PM »
I have a title menu in the game, and when you move the mouse cursor over the "NEW GAME" entity, how do I make it activate an animation when you put the mouse cursor over it, and then when mouse cursor is not on it, reverse the animation.
The animation is a slight zoom in on the text, and then zooms back out when the cursor is not on it.
Logged
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Hotspot Animations
«
Reply #1 on:
March 26, 2007, 05:24:57 PM »
You didn't say how your menu is done. But I'll suppose it's not an ordinary window (because it's pretty straightforward to assign hover images to buttons), but it's made of entities, right? In that case see
this thread
for an example of how to change entity sprite on mouse over.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
noxis
Lurker
Karma: 0
Offline
Gender:
Posts: 32
Noxis Interactive
Re: Hotspot Animations
«
Reply #2 on:
March 27, 2007, 03:39:36 AM »
I did that and when the cursor was over the hotspot it kept looping the first frame over and over again, until i moved the cursor away from the image it would go through the whole animation. I would display the code but I'm not at home at the moment. Actually I'll try to remember it off the top of my head
on "MouseEntry"
{
newgame.SetSprite("sprites\menu\newgame_zoomin.sprite");
}
on "MouseLeave"
{
newgame.SetSprite("sprites\menu\newgame_zoomout.sprite");
}
Also when I make the initial entity of the "new game" and I have to attach a sprite to it, should I make a one frame animation of the first frame? So it doesn't automatically when the screen loads.
Logged
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Hotspot Animations
«
Reply #3 on:
March 27, 2007, 11:53:35 AM »
Your newgame_zoomin.sprite is probably set as looping animation. Uncheck the "Looping" check-box in SpriteEdit and it should work ok.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
Print
Pages: [
1
]
« previous
next »
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Hotspot Animations