Transition Hotspot

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Transition Hotspot

Postby Giuseppe » Tue Feb 17, 2015 8:36 pm

Hi
can have the hotspot transition?
example: There is a locked drawer with hotspot, I click the drawer locked and activates the hotspot with open drawer bye the variable.
I can to have a transition when hotspot with the drawer open appear?
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm

Re: Transition Hotspot

Postby reneuend » Wed Feb 18, 2015 12:48 am

you want to gradually change the image on the hotspot Kind of like frame transition?

There isn't anything built in AM that will do this but it can be done by replacing several images using the CreateTimedEvent command. If interested in this method, let me know and I will show you.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2680
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Transition Hotspot

Postby Giuseppe » Wed Feb 18, 2015 3:36 am

yes. hotspot by hotspot as a frame.
I am interested in this method, thanks.
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm

Re: Transition Hotspot

Postby reneuend » Thu Feb 19, 2015 12:31 am

Hi Giuseppe,

From what I can find on the internet, you can't fade a Picturebox, which is what a Hotspot is. I think.
Anyway, I thought we should come up with something that doesn't require building several pictures of an image that fades into a new image.
I thought maybe we could just vibrate (shake) the image to the final image.

Try this effect and see what you think.

In the Hotspot's properties - advanced tab:

Note: You only need to change "two.jpg" to the image you ultimately want to display. Nothing else needs to be changed for this to work.

Code: Select all
LeftPos = Hotspot(Action.GetHotspotNumber).Left
TopPos = Hotspot(Action.GetHotspotNumber).Top
Shake = 45  'this is the amount of shake

for x=0 to 5000
  Hotspot(Action.GetHotspotNumber).Move LeftPos - Shake, TopPos
  Hotspot(Action.GetHotspotNumber).Move LeftPos + Shake, TopPos
  if x = 4000 then
    Action.LoadAPicture Hotspot(Action.GetHotspotNumber), "two.jpg"    '  <--- change two.jpg to your resulting image file that you want to ultimately display
  end if
next
Hotspot(Action.GetHotspotNumber).Move LeftPos, TopPos
Hotspot(Action.GetHotspotNumber).Enabled = False


Be sure to change "two.jpg" to the result image you will be using.
And be sure to load this image to the Areas folder


In my example, I disable the hotspot once it is done. This might not what you want. If you still want the user to be able to click on it and have something besides the shake to occur again, create an integer variable from the Variable section. Let's call it, "DoTransition"

Now just wrap the code in an IF condition like this

Code: Select all
LeftPos = Hotspot(Action.GetHotspotNumber).Left
TopPos = Hotspot(Action.GetHotspotNumber).Top
Shake = 45  'this is the amount of shake

if DoTransition = 0 then
  for x=0 to 5000
    Hotspot(Action.GetHotspotNumber).Move LeftPos - Shake, TopPos
    Hotspot(Action.GetHotspotNumber).Move LeftPos + Shake, TopPos
    if x = 4000 then
      Action.LoadAPicture Hotspot(Action.GetHotspotNumber), "two.jpg"    '  <--- change two.jpg to your resulting image file that you want to ultimately display
    end if
  next
  Hotspot(Action.GetHotspotNumber).Move LeftPos, TopPos
  DoTransition = 1
End If







Let me know what you think!
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2680
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Transition Hotspot

Postby Giuseppe » Fri Feb 20, 2015 10:22 am

ok, nice.
Thanks
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 2 guests

cron