Panorama Cursor Position

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

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

Panorama Cursor Position

Postby markmack » Mon Jan 14, 2008 1:19 am

Hi guys,

I've been using AM for a good while now, but have never posted here before. I really enjoy AM, and I'm particularly partial to the panoramic features, but I've found them a little limiting.

I've found decent work-arounds for most of the limitations, but I'm wondering if there's any way to have the game "go back to the last panoramic frame" at a specific position on that picture using VBscript. (x and y coords, degrees, etc.) Essentially I want to jump to a menu frame and be able to exit that frame and return to the EXACT position in the previous frame.

Any help would be GREATLY appreciated!

Thanks!
markmack
New Member
 
Posts: 5
Joined: Mon Jan 14, 2008 1:03 am

Postby GM-Support » Mon Jan 14, 2008 12:40 pm

Hi markmack,

Instead of checking the option "View as 360 degree panorama" from the plugins tab of the Frame Properties, you can execute the following VBScript code:

Code: Select all
StartPanorama(AMPanoHorizontalAngle,AMPanoVerticalAngle,AMPanoAspectRatio)

where "AMPanoHorizontalAngle", "AMPanoVerticalAngle", and "AMPanoAspectRatio" are the same parameters as those that you usually specify in the Frame Properties.

I can't try it out right now because I am in travel and I am using AM in a virtual machine (3D is not allowed). However it should work fine.


Alternatively, you can retrieve the current viewing angle with the following code:
Code: Select all
HorizontalAngle = Component("AMPano").Object.GetHorizontalCameraAngle
VerticalAngle = Component("AMPano").Object.GetVerticalCameraAngle


and you can set the viewing angle with the following code:
Code: Select all
Component("AMPano").Object.SetHorizontalAngle HorizontalAngle
Component("AMPano").Object.SetVerticalAngle VerticalAngle


If you use global variables to remember the last frame (like in this plugin) and to remember the last camera angle, it should do the trick.

To better understand how the panoramic plugin works, be sure to edit the plugin by clicking "Create/Modify Plugins", then selecting "AMPanoramaPlugin_v7_part1of4" and clicking "Edit Selected Plugin".


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

Postby markmack » Mon Jan 14, 2008 4:02 pm

Thanks for the quick reply!

I tried the code and got some mixed results. The first one gives me the error "cannot use parentheses when calling a sub" whenever I try to use it, so I couldn't do much.

The second one did sort of function when I stored the global variables "HorizontalAngle" and "VerticalAngle," but it was sending me to seemingly random parts of the frame and turning off panoramic mode. For example: I clicked the middle of a frame around the 50 degree mark to store the variable, then clicked another nearby hotspot that was set to send me to the stored point. Instead, it shot me to a seemingly random still-frame, looking up. I'm not really sure why that is...I'll have to mess with it some more.

Is there some VBscript I can execute to keep the game in panoramic mode after jumping to a stored point? After seeing the results, I'm thinking it MUST be possible to do what I'm trying to do...
markmack
New Member
 
Posts: 5
Joined: Mon Jan 14, 2008 1:03 am

Postby GM-Support » Thu Jan 17, 2008 12:38 pm

Hi,

I need to make some tests.

As far as the first problem is concerned (the error "cannot use parentheses when calling a sub"), it is because you must remove the parenthesis, like this:
Code: Select all
StartPanorama AMPanoHorizontalAngle,AMPanoVerticalAngle,AMPanoAspectRatio


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

Postby markmack » Thu Jan 17, 2008 9:22 pm

Removing the parentheses did get the command to work, but I'm afraid I'm still having problems. :(

When exiting the menu, the command executes on the menu screen making in into a warped panorama for a couple of seconds before leaving the menu. Afterwards, I made it run on the screen that you return to after exiting the menu and it didn't seem to function at all. And when I use the command on a hotspot, while it does work, the game runs slower and slower every time I click -- as if multiple panoramic frames might be running on top of each other.

If you get a chance to run a couple of tests I'd be VERY interested in knowing what you can find out. Thanks again for taking the time to assist me with this problem.
markmack
New Member
 
Posts: 5
Joined: Mon Jan 14, 2008 1:03 am

Postby GM-Support » Mon Jan 21, 2008 1:32 pm

Hi markmack,

Ok, I have spent some time working on it and I have found an easy way to do it.

I have posted a tutorial about it (I have posted it to another topic to keep it clean, since the code I suggested in the previous messages was not really appropriate to achieve this result). You can read it here:

http://www.adventuremaker.com/phpBB2/vi ... php?t=3484


I have tested it and, unless typos, it should work fine. Please keep me updated.

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

Postby markmack » Mon Jan 21, 2008 9:21 pm

Wow, I just tried it and it works PERFECTLY! It does exactly what I need it to do. Thank you so much for taking the time to help. :D
markmack
New Member
 
Posts: 5
Joined: Mon Jan 14, 2008 1:03 am

Postby GM-Support » Mon Jan 21, 2008 10:26 pm

Thanks!

By the way, do you have a demo of your game (even just a few frames), or something that you can show us that runs in 360 degrees?

I have not seen any real panoramic game yet (except of course the demo that I created, and a few other tests by other people), so I cannot wait to see one!
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron