crossing variables and scripts

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

crossing variables and scripts

Postby albalustro » Sat Dec 01, 2012 9:04 pm

What VBscript I could use to run only if a interger variable is = 1.

For instance, I want that a default cursor changes to another only when a interger variable "cursor" is = 1.

If this interger variable tunrs back to = 0, the cursor also changes to default again.

Is possible do this?
“Creativity is contagious. Pass it on.” - Albert Einstein
albalustro
Junior Member
 
Posts: 14
Joined: Thu Jul 22, 2010 2:56 pm

Re: crossing variables and scripts

Postby reneuend » Sun Dec 02, 2012 5:20 am

Hi Albalustro,

You'll be happy to know this is very simple to do.

Here is how its done:

First create the variable, "cursor", as an integer. I assume you know how to do this.

If you want the cursor to toggle between default and some ico file you created when the user clicks on a hotspot, then put this code in the advanced tab of the hotspot:

Code: Select all
If cursor = 0 then
    Action.ChangeDefaultCursor "filename"
else
    Action.ChangeDefaultCursor ""
end if


Note: Be sure to change "filename" in the above code to the "ico" or "cur" filetype that want to use in place of the default cursor. Be sure the file is in the "resources" subdirectory of your project.

There are variations of this depending on how or when you want the cursor to change.
Write back if you need more help or have a different way you want this to work.
---


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

Re: crossing variables and scripts

Postby Simon » Sun Dec 02, 2012 5:59 pm

That depends if he has the free version and can use code or not :)
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France

Re: crossing variables and scripts

Postby reneuend » Sun Dec 02, 2012 7:15 pm

Thanks Simon. I have a problem with assuming everyone has the purchased version! :P
He didn't mention creating a variable called, "cursor". Can you create variables in the free version?
---


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

Re: crossing variables and scripts

Postby Simon » Sun Dec 02, 2012 11:05 pm

I think you can. I believe that the free version of AM allows the menu to use variables depending on their state (0 or 1) in the frames properties.
User avatar
Simon
Expert Member
 
Posts: 418
Joined: Sun Jun 10, 2012 1:47 pm
Location: France


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron