Is it possible to change the frame image via VBScript?

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

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

Is it possible to change the frame image via VBScript?

Postby CBSection31 » Sat Oct 24, 2009 3:57 am

Hi everyone,

Is there some way of doing the following?

Code: Select all
If variable=1 then change frame image to "image.jpg"


I don't want to change a hotspot image, and placing a hotspot over the entire frame and setting it to only appear when a variable=1 will not work in this situation. I need to be able to change the frame image itself...assuming it is possible!

Thanks! :)
CBSection31
Code Master
 
Posts: 564
Joined: Tue Jun 10, 2003 4:00 am

Postby juhuwoorps » Sat Oct 24, 2009 5:11 am

juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby CBSection31 » Sat Oct 24, 2009 7:04 am

Thanks very much! I can't believe I missed that when I ran a search. :shock:
CBSection31
Code Master
 
Posts: 564
Joined: Tue Jun 10, 2003 4:00 am

Postby Imari » Sat Oct 24, 2009 6:11 pm

Oh, that's very cool!

So, one would just create a variable and corresponding hotspot to trigger (say) the onset of night, place any alternate frame images into the External folder, and then add the following code to the Frame Properties > Advanced Tab for every affected frame?

Code: Select all
If my_variable = 1 then
BackgroundObject.Picture = LoadPicture(GetPath(2) & "/my_alternate_frame_image.jpg")


I was trying to figure out how to do that in the template that I made for my game, but settled for every scene being at dusk. I want to go try this. :P
User avatar
Imari
VIP
 
Posts: 872
Joined: Fri Jun 20, 2003 4:49 pm
Location: Virginia, USA


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron