What's the Difference..

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

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

What's the Difference..

Postby mercedes » Thu Oct 02, 2008 4:28 pm

What is the difference between these syntax..

Code: Select all
Hotspot(5).MouseIcon = LoadGraphicFile("FILENAME")
   Hotspot(5).MousePointer = 99


And this one----

Code: Select all
ScreenObject.MousePointer = 11
---


I see one is in the Hotspot...and the other is for the whole Frame...Change default cursor, is this like that.. the second syntax?..Is that the only difference..So in essence there are 3 different codes to load icons and or cursors.. Two are the same..and One is for a hotspot only ?

Also where can I find the numbers that fit all other Mouse Icons or Mouse Pointers...and,... what if i want to use one of my own..?


Many Thanks for response...:D

Also would one of these be helpful for using an Icon on an object..[Inventory Object] icon..I found that Change Default cursor to be a pain..for this effect..it was hard to drop the cursor....and i didn't want it to be the only icon for the whole frame..I wanted to click a Knife..let's say,and have the cursor become the knife..then if they clicked somewhere..other than..say the apple...the cursor would drop back to normal...This was diffucult..to do..Would one of these be more effective for this..?




Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Fri Oct 03, 2008 1:14 pm

Mercedes, in such a complicated area like Programming and Maths there are several different ways to do stuff.

These commands are almost Identical...
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby GM-Support » Fri Oct 03, 2008 3:31 pm

Both ScreenObject and Hotspot(x) have the properties "MousePointer" and "MouseIcon". They work the same way, but ScreenObject affects the whole screen while Hotspot(x) affects only the hotspot number x.

If the value of MousePointer < 99, it means that you are using one of the predefined icons, which are listed below (each line contains: name of the constant, corresponding value, and description):

Code: Select all
vbDefault   0   (Default) Shape determined by the object
vbArrow   1   Arrow
vbCrosshair   2   Cross (crosshair pointer)
vbIbeam   3   I beam
vbIconPointer   4   Icon (small square within a square)
vbSizePointer   5   Size (four-pointed arrow pointing north, south, east, and west)
vbSizeNESW   6   Size NE SW (double arrow pointing northeast and southwest)
vbSizeNS   7   Size N S (double arrow pointing north and south)
vbSizeNWSE   8   Size NW SE (double arrow pointing northwest and southeast)
vbSizeWE   9   Size W E (double arrow pointing west and east)
vbUpArrow   10   Up Arrow
vbHourglass   11   Hourglass (wait)
vbNoDrop   12   No Drop
vbArrowHourglass   13   Arrow and hourglass
vbArrowQuestion   14   Arrow and question mark
vbSizeAll   15   Size all


For example, to display an hourglass, use:
Code: Select all
Hotspot(x).MousePointer = 11


Please note that you can use either the constant name or its value for the MousePointer. In other words, the following line produces the same result:
Code: Select all
  Hotspot(x).MousePointer = vbHourglass


The two following lines are identical to each other:
Code: Select all
  Hotspot(x).MousePointer = 2
  Hotspot(x).MousePointer = vbCrosshair


In case that MousePointer < 99, the value of MouseIcon has no effect, and is just ignored.

To specify your own MouseIcon, you must set MousePointer to 99 (aka vbCustom):

Code: Select all
Hotspot(x).MousePointer = 99
Hotspot(x).MouseIcon = LoadGraphicFile("FILENAME")


GM-Support
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby mercedes » Fri Oct 03, 2008 10:04 pm

Code: Select all
Hotspot(x).MousePointer = 99
Hotspot(x).MouseIcon = LoadGraphicFile("FILENAME")


Thanks for this..I wondered about that..:)..

One more thing..is there away to "See" the numbers, like how do i know which pointer and it's number..is there a way to tell..? Or just keep putting in numbers in code, and learn that way.....?..




Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Chromegloss55 » Fri Oct 03, 2008 11:06 pm

Lyberodoggy wrote:Mercedes, in such a complicated area like Programming and Maths there are several different ways to do stuff.

These commands are almost Identical...


That is so true.

Speaking of Maths, I have often wondered if there is a way to do more advanced mathematics with VBScript.

I'd love to be able to use differential calculus in a project, I think it would be very beneficial.

Matrix arrays would come in handy as well.

But simple little other things like using the nCr notation would also be welcome.
_________________
2000 recession
Last edited by Chromegloss55 on Wed Feb 25, 2009 12:57 am, edited 1 time in total.
Chromegloss55
Forum Master
 
Posts: 630
Joined: Sat Nov 03, 2007 2:49 pm
Location: God Knows!

Postby Lyberodoggy » Sat Oct 04, 2008 10:05 am

There are several math functions in the standard library of VB and you can create a lot more...

Unfortunately, my academic level of Maths is low and I know them in greek, so I can't help with rotations/differentals etc.

If you give me the math type, I could work on it...
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Sun Oct 05, 2008 10:44 am

What is wrong with this code..I'm trying to load a graphic file..well a cursor in a procedure..and i want the default one..but i am unable to load the default one in the areas folder..its not listed as one of the icons..so i tried a few things..and can't get it to work..

Code: Select all
Hotspot(10).MouseIcon = LoadGraphicFile("vbdefault")
                     Hotspot(10).MousePointer = 0   



Also tried this and i'm getting invalid call or procedure and it says it can't load my frame [ERROR].

Code: Select all
Hotspot(10).MousePointer = vbdefault   --by itself..



Cause i'm not sure which mouse icon to use..:?

Any ideas of whats wrong with this..or is it because you can't load it as an icon..in the areas subfolder..

Thanks:D
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby GM-Support » Tue Oct 07, 2008 3:50 am

The following line won't work because "vbdefault" is not a file name, and you can only specify a file name after "LoadGraphicFile":

Code: Select all
'The following line has an error:
Hotspot(10).MouseIcon = LoadGraphicFile("vbdefault")


The following line should successfully restore the cursor to the default one:
Code: Select all
 Hotspot(10).MousePointer = VbDefault
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby mercedes » Tue Oct 07, 2008 3:53 am

Ok..didn't realize i had to capitize it...:? ...Thanks..!~
I'm pretty sure i had tried that..it would just tell me it can't find it ..I'll try it again though..:D
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby GM-Support » Tue Oct 07, 2008 4:04 am

No, you don't need to capitize it. The problem must be elsewhere.

Concerning the MousePointer/MouseIcon, here is a better explanation of how it works:

You can choose the appearance of the mouse pointer by setting the MousePointer property. You can choose among the built-in pointers (arrow, cross, hourglass, etc.) by setting MousePointer to a number that ranges between 1 and 15 (each number corresponds to a built-in cursor). Alternatively, you can use your own pointer. To do so, you must set the MousePointer to 99 (same as VbCustom), and then specify the "MouseIcon" property to point to a file on your disk (using the "LoadGraphicFile", as shown in my previous example). Last but not least, you can revert to the default pointer by setting the "MousePointer" to 0 (same as VbDefault).
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby mercedes » Tue Oct 07, 2008 4:07 am

Ok..so doing this though...don't i have to copy it to the Areas Sub folder...any other icon..would work..it was just the default one..because there was no way of me copying it to the subfolder..i don't see it in the list..

Which is why i thought that where i was going wrong..

Im doing this from a Procedure..and i have to copy the file to the folder..
Last edited by mercedes on Tue Oct 07, 2008 4:11 am, edited 1 time in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby GM-Support » Tue Oct 07, 2008 4:10 am

mercedes wrote:Ok..so doing this though...don't i have to copy it to the Areas Sub folder...any other icon..would work..it was just the default one..because there was no way of me copying it to the subfolder..i don't see it in the list..


what do you mean?
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby mercedes » Tue Oct 07, 2008 4:14 am

In order for me to put it in a procedure..to change any file..or put in ahotspot..u have to put it in the hotspots subfolder...the Default one..when i go to the icon list...its not there...all the others are..but not this one..and i have no way of adding it..hence why i get the error..Cannot find this file..must have been moved..yadayada..

Do u see it in the list..the Default pointer icon...?..Do u understand what i mean now..?..or have it messed it up worse..lol
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby GM-Support » Tue Oct 07, 2008 4:27 am

ok, now I see what you mean.

The default pointer is not supposed to be in the list of files. Actually there is no file that corresponds to the default pointer. The shape of the default pointer is only determined by Windows and can be changed from the Control Panel of Windows, not from Adventure Maker.

When you set the value of MousePointer to 0 (aka VbDefault), the value of MouseIcon is then ignored by Adventure Maker (i.e. when MousePointer is 0, it doesn't matter what you put in MouseIcon).

Setting MousePointer to 0 should be enough to revert to the default pointer. There is no need to mess with files.
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby mercedes » Tue Oct 07, 2008 4:37 am

Ah ok...That makes total sense.....of course..Many thanks for responding.., that clears things up..

Thanks Alot..GM..:D

Peace~
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests