About procedure file and documentation

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

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

About procedure file and documentation

Postby Adpist » Mon Sep 26, 2011 4:57 pm

Hi !

I've worked last year with a team of 20 students on adventure maker, and it looks like we'll use it again this year. I would like to know if it is possible to use more than one procedure file, and i wonder why it is a binary and not a text file.

There is more than one student working on scripts and we are using version control tool ( Turtoise ). The fact is that every change on procedure's file makes a conflict impossible to solve with Turtoise ( due to binary files ).

It would be easier if procedures were contained in a text file. And/Or allow users to create multiples procedure file ( instead of a single file containing more than 2000 lines of script ). I guess adventure maker wasn't made of a single code file ^^

An other thing i'd like to point is that i think the AM's scripting documentation is incomplete ( probably because i'm not quite familiar with VBS ). For exemple, in objects reference, given properties are "most interesting" ones. But i haven't be able to find a complete properties' listing... I tried to use some functions/objects mentionned in microsoft's VBScript language reference, but some of them were not available in AM, according to my tests. If you have some tips for this, i'll really appreciate them !

Thanks !

( hoping my english isn't too bad ^^ )
Adpist
Junior Member
 
Posts: 6
Joined: Thu Feb 10, 2011 11:56 am

Postby reneuend » Mon Sep 26, 2011 5:28 pm

Hi Adpist!

I'm glad you are still using Adventure Maker. :wink:

I would suggest setting up one or more plugins depending on your project's needs. This way your students can build procedures as an OCX. add the plugin(s) to the AM project, and finally, call the procedures from AM where needed.

I built a tutorial on building a plugin a couple years ago. You only need a basic plugin to hold your procedures, so it should be fairly easy to do.
http://www.adventuremaker.com/phpBB2/viewtopic.php?t=5021

As for references to VBA scripting in AM, I've learned by trial-and-error, and with the help from expert members on this forum.

One time I stumbled on VBA code on the internet for reading and writing files. I plugged it into AM and with a little tweaking got it to work.

I hope this helps!
---


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

Postby Adpist » Fri Oct 07, 2011 11:36 am

Hi !

Thanks for your answer, i'll give a try to plugins. It should do the trick for procedures. Thanks for the link, i'll take a look soon.

I have one or two more questions, i'll ask them here instead of creating a new topic.

is it possible to access/modify pixels of an image ? I want to take my frame's background, make it dark except a circle of "light". I just need to know how to access and modify pixels.

An other problem i'd like to solve is that last year i couldn't find how to display texts over hotspots ( buttons ). Is there a way to configure displaying priority in AM ? ( i want to create buttons with scripted texts depending on current language with only one background image )

Thanks =)
Adpist
Junior Member
 
Posts: 6
Joined: Thu Feb 10, 2011 11:56 am

Postby reneuend » Fri Oct 07, 2011 2:30 pm

The only possible way to manipulate an image is through a plugin or possibly by spawning an executable that would do the alteration for you. Unfortunately, I've never tried doing this kind of thing. You might PM someone like ShadowHunter.

Text over hotspots? There isn't a way to do this as far as I know, but there are tricks you can do. Instead of text characters, create small image characters and build the text using these image characters. This is how I created the AMJournal plugin. You might find a more practical solution by using plugins and using VB Buttons, but I haven't tried this.

I would suggest reposting this as a new thread to get more visibility for these questions. You might want to create 2 separate threads for these also.

I hope you find the answer!
---


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

Postby ShadowHunter » Fri Oct 07, 2011 9:14 pm

Hi,

Some quick response:

1. Yes you can manipulate an image I do it with KeyGuard all the time...

- Get the Hdc and Hwnd of the background object in AM
- Bitblt the background object to a buffer (picturebox or memory) in your plugin
- Perform the operation you'd like by using methods of the GDI32 like GetPixel, Setpixel, DrawText...
- Blit the whole thing back to AM

Now this sound not too hard but there a quite some difficulties to overcome, for example hotspots are not part of the background object so you need to virtual flatten it first, a 1 pixel offset that occurs in AM when blitting back, refreshing the background object automatically from with the plugin, blitting back only the altered part of the image instead of the full background image to increase performance, and many more...

Don't expect to make this in one, two, three but use the above keywords in Google and find your way... I managed, it so will you

If your goal is only to make it dark except for a circle, like a flashlight effect, simply download the existing Flashlight plugin, it works with a mask so you can make any shape you like.

2. Text over hotspots: don't waste your time making a figuring out a plugin for that, KeyGuard 5 allows you to do that without coding and features an easy to use interface... Semi public RC1 due within 3 weeks.

3. You cannot alter the Z-order of a label, the label is a windowless control and doesn't have a handle, it uses the parent container to draw text. Again, KeyGuard 5 bypasses this by flattening the image.

Good luck,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Postby reneuend » Sat Oct 08, 2011 1:33 am

Awesome ShadowHunter. I'm very excited about Keyguard 5!!!!!!!
Thanks for the nice explanation too.
---


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


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests