Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Proskrito on Fri 13/06/2003 22:38:08

Title: SCUMM templates - UPDATED 4-8-04
Post by: Proskrito on Fri 13/06/2003 22:38:08
**UPDATE 4-8-04: Go HERE (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=6642.80#msg191965)**

Ok, i made this templates for SCUMM interfaces,

Some features:

1- Easier way for defining and checking cursormodes (specially extended ones).
2- Map type rooms are handled by the template.
3- SCUMM-like interface, including:
     - Ability of assign predefined actions for hotspots, characters, inventory items and objects that will run with the right mouse button.
     - almost exact looking and working(some cosmetic issues :P) Save and Load GUIs, with up to 99 savegames. (maybe too many, but the games mentioned had 99 :) ).
     - Ability to assign actions to "Walk" modes
     - The main GUI works in the same way as the ones in MI2/DOTT/FOA.
4- Some little functions i made for myself that i think could be useful.
(I've also made normal, speech and credits SCI fonts for it, so grab them if you want)

I hope someone find it useful.

Read the documentation, although it's not very good  :(

EDIT: Two more templates  :)

LINKS:
Monkey Island 2 & Day of the tentacle:
http://usuarios.lycos.es/golfapagina/bazura/ (http://usuarios.lycos.es/golfapagina/bazura/)
(DOTT credits font by Synthetique)

Fate of Atlantis: (some things to fix atm)
http://galeon.com/golfa/otros/SCUMM-FOA.rar (http://galeon.com/golfa/otros/SCUMM-FOA.rar)

(might need "save target as")
Title: Re:Monkey Island 2 Template released
Post by: Scummbuddy on Sat 14/06/2003 06:32:08
Sweeet.  I'll test it out man, and I'll let you know how its going.  Thanks.
Title: Re:Monkey Island 2 Template released
Post by: Rui 'Trovatore' Pires on Sat 14/06/2003 09:27:08
I'll add it to my collection. Holler if you don't want me to.
Title: Re:Monkey Island 2 Template released
Post by: Scorpiorus on Sat 14/06/2003 15:26:12
I have tried it and... Yeah, it's very useful. Nice&Cool work mate! Thanks for this template! :D

-Cheers
Title: Re:Monkey Island 2 Template released
Post by: Jimi on Sat 14/06/2003 15:44:48
 :o

i...

wow...

I...LOVE it...

I think its great you've gone to all this trouble too.
Title: Re:Monkey Island 2 Template released
Post by: Pumaman on Sat 14/06/2003 16:04:16
Nice one :)

Very clever idea to use the ">" in the strings to do the default modes too :)
Title: Re:Monkey Island 2 Template released - UPDATED
Post by: Proskrito on Tue 17/06/2003 12:01:55
2 more SCUMM templates available:

*These templates doesnt have character animations

Day of the tentacle: Updated: it had a little problem, fixed now.
http://galeon.com/golfa/otros/SCUMM-DOTT.rar (http://galeon.com/golfa/otros/SCUMM-DOTT.rar)

Fate of Atlantis:
http://galeon.com/golfa/otros/SCUMM-FOA.rar (http://galeon.com/golfa/otros/SCUMM-FOA.rar)

(right click, save target as)

Title: Re:Monkey Island 2, DOTT, FOA Templates
Post by: Scummbuddy on Tue 17/06/2003 13:34:29
downloaded... but i have class. ill get back to you.  thanks!
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: LucasFan on Tue 17/06/2003 15:46:58
How can I change manually (by scripting) the extensions of a hotspot or an object, Proskrito?
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Proskrito on Tue 17/06/2003 16:58:57
I'm afraid that cant be done atm, because there isnt any function to change the name of hotspots.
I suggested that  while i was making the template, because i thought it would be very useful to be able to change the extensions
http://www.adventuregamestudio.co.uk/yabb/index.php?board=2;action=display;threadid=6489
lets see if chris implement something like that, and a ChangeExtension sort of function could be done.
if the object is a door, that if its open, the default action should be closed, and if its closed, the default action should be open, i think that as you should make 2 objects, or 1 object and 1 hotspot, one for open and other for closed, this is solved.
with characters, you could use character[CHARID].name variable.
The problem is with hotspots and inventory items. Im gonna mess with the script and i'll edit this post if i find something useful
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Scummbuddy on Tue 17/06/2003 16:59:01
Hmm... cursor 5... doesn't really look like a cross... more like Hoagie.  ;D
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Proskrito on Tue 17/06/2003 17:34:44
Lucasfan, this is what i have come to:
There could be a extension, say >v, for things that have variable extension, and then, in the global script, a function called VariableExtensions(), in which you would define which extension to have depending on whatever you want, like global ints, which room, which object... like:
you call "door>v" a door in the room #5, which is hotspot #3,
then, inside the VariableExtensions function you write:

if (player.room==5 && GetHotspotAt(mouse.x,mouse.y)==3)
 {
  if (GetGlobalInt(1)==0)
  { //if its open
     AddExtension('c',location); //set action Close
  }
  else
{ //if its closed
     AddExtension('o',location); //set action Open
  }
}

This is the best sollution i can think of (until hotspots could be renamed) , if you like it, tell me and i'll put it in the templates.
QuoteHmm... cursor 5... doesn't really look like a cross... more like Hoagie.   ;D
lol  ;D ;D, thanks for  telling me, it looked ok in game, so i didnt realized that.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: LucasFan on Tue 17/06/2003 18:16:23
Quoteif you like it, tell me and i'll put it in the templates.

I like it very much.  :)

Btw.: I think we could use a GUI for Restart.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Scummbuddy on Tue 17/06/2003 18:35:19
if you are playing thegame and you are in walk mode, you could click somewhere on the status bar, and the char would walk, thinking its part of the room.   Not neccisarily able to walk down there (of course if you add a walkable area, maybe) but I dont think we should be able to click there and have a walking ability.  I thought it was there so that we could click on a command line that we want to happen, but that is not the case, so i guess im just confused as to why its clickable which causes the char to walk in that direction.... like if he starts off by the sign on scabb island (no treasure huntin' zone) and you click on 'walk to' down on the status line, guybrush will walk onto the bridge.

And just wondering, why did you not keep the status line and the 9 verbs on the same gui?  
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Proskrito on Tue 17/06/2003 19:10:52
QuoteBtw.: I think we could use a GUI for Restart.
Ok, not so difficult to make ;)
Quoteif you are playing thegame and you are in walk mode, you could click somewhere on the status bar, and the char would walk
Oh, i see. Make the gui called ACTION clickable and that should do it  :)
QuoteI thought it was there so that we could click on a command line that we want to happen,
mmm might it happened in indy3 and maniac mansion?? (those that didnt put automatically in the status bar the name of the thing the mouse was over) I think from monkey island 1 up, that didnt happened, but im not sure.
QuoteAnd just wondering, why did you not keep the status line and the 9 verbs on the same gui?
I made it that way because when you go to see the voodoo lady in the
coffin,you see the status bar, but dont see the verb box and inventory.
And later i was happy of making it that way, cos it made things easier when triying to do the highlighting effect in the status bar
Thanks for telling me all the errors or other flaws!! :)
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Scummbuddy on Tue 17/06/2003 19:14:53
Quote from: Proskrito on Tue 17/06/2003 19:10:52

Quoteif you are playing thegame and you are in walk mode, you could click somewhere on the status bar, and the char would walk
Oh, i see. Make the gui called ACTION clickable and that should do it  :)

worked just fine.  thanks a lot.  I'll let you know more if i see any.  This is really great!
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Proskrito on Wed 18/06/2003 16:39:48
Lucasfan: the restart gui and the variable extensions done
Scummbuddy: The status bar thing and the cursor 5 not being hoagie done

http://usuarios.lycos.es/golfapagina/bazura/ (http://usuarios.lycos.es/golfapagina/bazura/)

And just one thing that isnt in the doc file yet: put the interactions of the extended modes in the "extended" interaction, and the walk modes in the "walk to" interaction,  (or usermode1 and usermode2,  dont remember if i changed the names) not in "any click" interaction, because if not, sometimes unhandled_event could be called when it shouldn't.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: LucasFan on Wed 18/06/2003 21:34:38
I Love You Man!  :D
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Scummbuddy on Thu 19/06/2003 17:54:52
just something small, but i forgot to report.  Just a graphic problem. on your 'logo' page, there are still shadow marks from where lucasguy used to have his arms up along with the eyelash lines...  i like what you did with it though.  very humourus
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Proskrito on Fri 20/06/2003 15:12:55
ah, thanks... i know what are you talking about... it looked as the same black in photoshop, thanks for spotting it out. i forgot to remove the intro room  ;D . i'll remove that room in the next upload, (and i'm fixing the translations thingie, it didnt work very well)
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Scummbuddy on Fri 20/06/2003 17:52:35
this is weird.

I imported more bg's to make more rooms in the dott styled one, and after i saved them, i went back to the room descriptions panel, and they already came with room descriptions from the MI style template... kinda weird.. i didnt know the descriptions were saved from the last time a room name is saved and then deleted and then remade again...

but after rereading this, i guess its not a problem at all.. i just didnt know it did that.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Proskrito on Fri 20/06/2003 19:26:59
heh, i tried what you said and its true, it seems like it saves the room descriptions even if you remove the rooms, and since i did the 3 templates from the mi2 one, they must be still there.  I'll try to remove them.  
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Jimi on Thu 31/07/2003 16:54:27
How do you set what happens?

example: If I wanted to have the character walk to a point after he chooses "push" on a wall, what would I do?

I tried to find out by looking through the global script, but I kept getting lost.  :-\
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Proskrito on Fri 01/08/2003 12:43:56
to define interactions for extended modes, in the Extended modes interaction (cursor mode 8) you should write something like this:
if (UsedMode("push")){
//do push interaction
}
else if (UsedMode("pull")){
//do pull interaction
}
else unhandled_event();

EDIT: with the template there should be a text document explaining these things, try to read it and understand my english ;)
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Red_Armadillo on Mon 25/08/2003 21:30:48
For me it says that it was made with an earlier or beta version, anybody know why?
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Scummbuddy on Mon 25/08/2003 21:52:34
Cause it was.  The last time Proskrito updated the template was with an earlier version.  You shouldn't have any problems with it though.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: Red_Armadillo on Tue 26/08/2003 03:27:49
It starts up, I open the template and it loads then it closes and displays the message...

[glow=color,glow width,2characters wide]This template was either made with an earlier version or a beta version, please write all this crap down [/glow]

I don't really need it, I already created a Monkey Island type interface where you can save and crap
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: on Thu 28/08/2003 12:38:01
It happens the same to me, cause I had AGS 2.55. I downloaded version 2.56 from the forum and the Scumm GUI works.
You should try in 2.56 if you have 2.55 or
try in 2.55 if you have 2.56. (Then export the GUI to 2.56 or something).
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: on Thu 28/08/2003 12:41:03
Oh...Thanks Proskrito for the FOA, MI2 and DOTT Scumm.
Gracias :D
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: on Wed 17/09/2003 16:28:30
The MI2 gui download doesnt work there:
http://usuarios.lycos.es/golfapagina/bazura/

Where can I download it now??

But Ive downloadet the FOA gui!
I only can say WOW!
Respect!

Fabs
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED
Post by: skulls on Sun 21/09/2003 12:12:46
Use a program like Netants for downloading that  ;)
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Proskrito on Tue 02/12/2003 17:03:21
**there was a bug (that caused the template seem to proccess the left clicks as 'walk to' instead of the proper interactions) in the 1.2 versions of the templates,so get the new ones:**

Here is a new version of the Monkey Island 2 and Fate of Atlantis templates:
http://galeon.com/golfa/otros/nuevos/MI2_template_v13.rar (300kb)
http://galeon.com/golfa/otros/nuevos/FOA_template_v13.rar (100kb)


for people that have used other versions, the changes are:
-- CHANGES SINCE LAST VERSION: --
1- Added MovePlayerEx(int x, int y, int direct) , MovePlayer(int x, int y) and Go() ‘Semi-Blocking' kind of functions for the player character, so i.e: if the player push ‘Open door', the player character will start walking to the door, and, if no mouse button is pressed, the ‘Open' interaction will be run when the player character gets there. But, if a mouse button is pressed, the player character will stop, abort the ‘Open' action, and do the new action that this mouse click had triggered.
NOTE: You must NOT set any walk-to point to a hotspot in the room editor to make these functions work properly. If you set a walk-to point, the action will be blocking, and you won't be able to cancel the action.
2- Added ‘>e' extension for automatic handling of going to another room walking off screen first. A kind of substitute for ‘Walk off right/left screen edge' interaction, but in a MI2 way, so you know where you are going. i.e: Walk to road. -> road being a hotspot called ‘road>e' at the very right of the room -> player disappears at the right of the room -> NewRoom.
3- For running unhandled events in modes that share the same AGS cursor mode, where you used ‘else unhandled_event();', you'll have to write ‘else Unhandled();' instead.
4- Added Translation(string language) function for easier changes in things that could vary from one language to another.
5- Fixed some ‘bugs' and other things. : )
---------------------------------

as i dont know if these functions work perfectly, any feedback is welcome!  :)
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: Scummbuddy on Tue 02/12/2003 17:08:30
Hey buddy, you know I'll give this a try tonight and let you know.  Thanks for all the work you do.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: Barcik on Tue 02/12/2003 18:45:36
Prosk, can you please give me a short guide on how to update the old version I have on MI1.5 to the new one?

And I have two requests.
1) Can you please implement scrolling arrows in the dialog GUI?
2) Can you please build smart scrolling into the template? You can use this (http://www.adventuregamestudio.co.uk/yabb/index.php?board=2;action=display;threadid=4890) for reference.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: Proskrito on Tue 02/12/2003 20:09:58
Thanks scummy, glad you like it! :)

QuoteProsk, can you please give me a short guide on how to update the old version I have on MI1.5 to the new one?
mmm... since most of the functions had changed, if you havent modified the template functions at all or you know where you have modified them, i think that the best way would be to copy the entire new global script over the old one, and then add the changes you made to it. (I could help you if you want : ) ).
Then, you should replace all the 'else unhandled_event()'s with 'else Unhandled()'s , and if you want to take advantage of the new features, i dont know, but maybe you should make it one by one... :-\
QuoteCan you please implement scrolling arrows in the dialog GUI?
Mmmm i dont know if that is possible at all, its in the tracker, maybe you could make an option in the dialog called 'More...' or something like that, that hide some options and show another ones??... i think i cant help much in this one  :-[
QuoteCan you please build smart scrolling into the template? You can use this for reference.
Mmmm i couldnt find a-v-o's script, just the old one that gave some errors. If you can find it, tell me and i'll try to :). I remember i tried it some time ago but, maybe i couldnt set it up well, but it worked in a strange way in my tests, so i didnt use it.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: a-v-o on Wed 31/12/2003 15:09:29
Proskrito:
My server is currently down, but I can send you the script by eMail.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: BlackBaron on Fri 02/01/2004 21:51:23
I created a new game using the FOA template (of the file FOAtemplate_v12.rar) with AGS 2.6, then I try to compile it and test it right away.
I get the first screen (with the DamianArts logo) and right after that, when it should go into the next screen, the game stops and I get this error mesagge:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x0041DE7A ; program pointer is +333, ACI version 2.60.693, gtags (0,36)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
---------------------------
Aceptar  
---------------------------
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: Proskrito on Fri 02/01/2004 22:30:16
It must be the bug that Chris said in the 'Problems upgrading to v 2.6' thread, so to solve it you must have a sprite numbered 2054. read this: http://www.adventuregamestudio.co.uk/yabb/index.php?board=2;action=display;threadid=10665 (point 2)
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: BlackBaron on Sat 03/01/2004 02:48:00
Yeah, that was it, now it works, thanks a lot.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: Scummbuddy on Fri 16/01/2004 20:13:00
From my computer: the Smart Scroll code plus a question and its answer taken from this forums.  Hope you still need it, as I would too like to see it implemented
-----------------------------
#define DISTANCE_FROM_EDGE 30
#define SCROLL_SPEED       2
#define SCROLL_MUL         3
#define SCROLL_DIV         4

int RoomWidth;
int ScreenWidth;
int ScreenWidthHalf;
int ScrollDistance;
int MaxViewportX;
int ViewportTargetX;

function on_event (int event, int data)
{
 // SmartScrolling - start
 int room;
 int CharacterX;
 if (event == ENTER_ROOM)
 {
   room = character [GetPlayerCharacter()].room;
   RoomWidth = game.room_width;
   ScreenWidth = 320;
   if (RoomWidth > ScreenWidth)
   {
     ScreenWidthHalf = ScreenWidth / 2;
     ScrollDistance = ScreenWidth * SCROLL_MUL / SCROLL_DIV;
     MaxViewportX = RoomWidth - ScreenWidth;
     CharacterX = character [GetPlayerCharacter()].x;
     if (CharacterX < ScreenWidthHalf) ViewportTargetX = 0;
     else if (CharacterX > RoomWidth - ScreenWidthHalf) ViewportTargetX = MaxViewportX;
     else ViewportTargetX = CharacterX - ScreenWidthHalf;
     SetViewport (ViewportTargetX, 0);
   }
   else ReleaseViewport ();
 }
 // SmartScrolling - end
}

function SmartScrolling ()
{
 int vpx, crx;
 if (RoomWidth > ScreenWidth)
 {
   vpx = GetViewportX();
   if (vpx == ViewportTargetX)
   {
     crx = character [GetPlayerCharacter()].x - vpx;
     if (crx < DISTANCE_FROM_EDGE)
     {
       ViewportTargetX = vpx - ScrollDistance;
       if (ViewportTargetX < 0) ViewportTargetX = 0;
     }
     else
     {
       crx = ScreenWidth - crx;
       if (crx < DISTANCE_FROM_EDGE)
       {
         ViewportTargetX = vpx + ScrollDistance;
         if (ViewportTargetX > MaxViewportX) ViewportTargetX = MaxViewportX;
       }
     }
   }
   if (vpx < ViewportTargetX)
   {
     vpx += SCROLL_SPEED;
     if (vpx > ViewportTargetX) vpx = ViewportTargetX;
     SetViewport (vpx, 0);
   }
   else if (vpx > ViewportTargetX)
   {
     vpx -= SCROLL_SPEED;
     if (vpx < ViewportTargetX) vpx = ViewportTargetX;
     SetViewport (vpx, 0);
   }
 }
}

function StopScrolling ()
{
 ViewportTargetX = GetViewportX ();
}

function repeatedly_execute()
{
 // put anything you want to happen every game cycle here

 // SmartScrolling - start
 SmartScrolling ();
 // SmartScrolling - end
}

function on_mouse_click(int button)
{
 // called when a mouse button is clicked. button is either LEFT or RIGHT
 if (IsGamePaused() == 1)
 {
   // Game is paused, so do nothing (ie. don't allow mouse click)
 }
 else if (button == LEFT)
 {
   // SmartScrolling - start
   StopScrolling ();
   // SmartScrolling - end
   ProcessClick(mouse.x, mouse.y, GetCursorMode() );
 }
 else
 {
   // right-click, so cycle cursor
   SetNextCursorMode();
 }
}

------------------------------

what's scroll mul and scroll div?

here's a trick I learned:

while(character[GetPlayerCharacter()].walking) {
SmartScrolling();
Wait(1);
}


------------------------

Quote from: netmonkey on 18 Mar 2003, 13:47
what's scroll mul and scroll div?

In the previous script when the scrolling finished then the character was in the middle of the screen. After walking over less than half of the screen scrolling started again. With mul/div you can adjust the position. With mul/div = 1/2 the character will be in the middle of the screen. With mul/div = 3/4 it will end so that if the character continues its way then it can walk over about 3/4 of the screen before scrolling starts again. Just try out 1/2 and 3/4 to see the difference.
(btw: 2/4 = 1/2 = 3/6 = ...)




[Edit] Now a-v-o has updated a site with the smart scrolling code, so it was pointless for me to put it up, if you guys still need it. http://a-v-o.privat.t-online.de/ags/
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: HillBilly on Fri 16/01/2004 20:21:53
Bleh... 404.  :P

Damn you lycos!
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: Scummbuddy on Fri 16/01/2004 20:34:36
---------------------------
Adventure Game Studio
---------------------------
An error has occured. Please contact the game author for support, as this
is likely to be a scripting error and not a bug in AGS.
(ACI version 2.60.697)

Error: A text script run in the Player Enters Screen event caused the
screen to be updated. If you need to use Wait(), do so in After Fadein

---------------------------
OK  
---------------------------

I'm still using the older MI Template, I'm preparting to update.  I'm not sure what its talking about though. It happens just when I hit TestGame, and before any room pops up(even though the screen goes black, and then comes back with this message. I've checked the code in the first room and there isn't any Waits in there except where you put them in your original code, in the after fade in.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: on Sat 17/01/2004 16:49:51
I just run dott templetate.
If I try to walk somewhere,then ....


An internal error...Chris Jones.
(ACI version 2.60.693)

Error:run_text_script:error -1(Runtime error:wrong number of
parametres to exported function 'unhandled_event')
running function 'unhandled_event'
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: Proskrito on Sat 17/01/2004 20:54:55
they could be the problems listed here: http://www.adventuregamestudio.co.uk/yabb/index.php?board=2;action=display;threadid=10665
scummy: #2
knar87: #1

knar87: to solve this problem,see this:
http://www.adventuregamestudio.co.uk/yabb/index.php?board=2;action=display;threadid=10550;start=msg128735#msg128735
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: Scummbuddy on Mon 19/01/2004 15:40:39
Its not caused by that 2054... although I did change the cursor, i overwrote them with my own graphics, and I changed some mudane (random) sprite to 2054, and tried test game, and it didn't work. weird things
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: a-v-o on Mon 19/01/2004 19:59:39
Scummbuddy:
Can you post the script in (...before fadein) of the first room?
...and maybe the game_start and repeatedly_execute in global script?
One more possibility that could cause an error could be the code in the on_event in the global script.

Maybe the message means that there shouldn't any blocking command. Also display commands shouldn't be executed before fadein.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Sun 08/02/2004 20:16:15
// room script file

function room_a() {
 // script for room: Player enters screen (after fadein)
StartCutscene(5);
Wait(120);
NewRoomEx(1,750,40);
EndCutscene();
}

function room_b() {
 // script for room: Player enters screen (before fadein)
SetMusicMasterVolume(100);
GUIOff(MAINGUI);  
GUIOff(ACTION);  
HideMouseCursor();
}

function room_c() {
 // script for room: Player leaves screen
GUIOn(MAINGUI);  
GUIOn(ACTION);    
ShowMouseCursor();
}



Should I just update to the latest and greatest version and see how it goes? I don't see a problem with whats above.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: a-v-o on Sun 08/02/2004 20:34:29
I can't see anything wrong either. Maybe there is something in the game_start or repeatedly_execute.

Feel free to send me the game for testing.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: MarvinS on Wed 17/03/2004 15:39:00
I'm trying the FOA template

When I click on the Interaction button, in the Room->Object Editor, I dont find the "Interact Object" choice.

So how do I do to make my characters pick up an object ?

I try to put my code in the "picke up object" area, but nothing happend.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Wed 17/03/2004 16:02:36
You asked this in the beginners forum, and it will be answered there.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: MarvinS on Wed 17/03/2004 16:23:37
Ok, sorry.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Sun 21/03/2004 17:27:25
Proskrito, I'm using the newest beta, 3, with the MI2 template, and when I try and save my game I get this message:
--------------------------------------------------------------
---------------------------
Compile Error
---------------------------
There was an error compiling your script. The problem was in 'Main script':

Error (line 110): Cannot return local string from function

------------------------------------------------------------



and on line 110, and the surrounding code, we have:
------------------
/**/function RemoveExtension(string location){
/**/  //removes the extension of a string  
/**/  int length=StrLen(location);
/**/  if (Extension(location)!=0) StrSetCharAt(location,length-2,0);
/**/  return location;                   //<----line 110
/**/}

any ideas?
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Pumaman on Sun 21/03/2004 18:18:45
Hmm, this is a bug in the 2.61 betas actually, it should allow a parameter to be returned. I'll fix it for beta 4.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Proskrito on Sun 21/03/2004 21:19:29
ah, simply remove the 'return xxx;' line, i didnt know what i was doing, and i tried to return a string : / ; )
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Sun 28/03/2004 21:38:15
This has now been fixed in the newest beta, should the code be re-written, or shall I go on with what it is now? I had to "//" out 3 or 4 lines of code because there were 3 or 4 functions that tried to return the strings.
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Proskrito on Mon 29/03/2004 22:32:11
you can leave them //'ed, the return lines do nothing
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: MarvinS on Wed 21/04/2004 16:46:16
I this possible, in Proskrito's Scumm GUI, to disable the higlight of the "look at" verb, on certains objects ?
I want that nothing happen, when the mouse go over certains objects.

Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: .. on Wed 21/04/2004 19:40:04
Am I the only one who gets a 'you are not authorized to view this page' when i try to download the MI GUI? This sounds like a CHMOD Prob to me..
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: on Thu 22/04/2004 00:36:00
Hi proskito...you are a god!
I'm making a fantastic monkey island fan game with your interface but..
..I got some problems!!
The game, when I point and click in a walkable area does not write "walk to" but "use"
How can i solve this problem?
..maybe in the code-line 398??
please help me!
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Proskrito on Thu 22/04/2004 00:46:34
Marvin: Just put the extension >n to the name of those things you want nothing to happen when clicked.
Scuthbert: the links here: http://www.adventuregamestudio.co.uk/yabb/index.php?board=2;action=display;threadid=6642;start=msg122548#msg122548 seems to work for me.
Lucatuz: it shouldnt happen ??? did you modify something? what is the line 398?
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: MarvinS on Thu 22/04/2004 07:30:44
Thanks a lot Proskrito :)
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 1-12-03
Post by: Scummbuddy on Sat 24/04/2004 22:49:52
Quote from: a-v-o on Mon 19/01/2004 19:59:39
Scummbuddy:
Can you post the script in (...before fadein) of the first room?
...and maybe the game_start and repeatedly_execute in global script?
One more possibility that could cause an error could be the code in the on_event in the global script.

Maybe the message means that there shouldn't any blocking command. Also display commands shouldn't be executed before fadein.

// room script file

function room_a() {
 // script for room: Player enters screen (after fadein)
StartCutscene(5);
Wait(120);
NewRoomEx(1,750,40);
EndCutscene();
}

function room_b() {
 // script for room: Player enters screen (before fadein)
SetMusicMasterVolume(100);
GUIOff(MAINGUI);  
GUIOff(ACTION);  
HideMouseCursor();
}

function room_c() {
 // script for room: Player leaves screen
GUIOn(MAINGUI);  
GUIOn(ACTION);    
ShowMouseCursor();
}



Quote from: a-v-o on Sun 08/02/2004 20:34:29
I can't see anything wrong either. Maybe there is something in the game_start or repeatedly_execute.


/**/function game_start() {
/**/     // called when the game starts, before the first room is loaded
/**/////////PUT YOUR SCRIPTS HERE IF POSSIBLE///////////
game.dialog_options_y=1;
game.dialog_options_x=1;
game.items_per_line=4;
game.num_inv_displayed=8;
game.text_speed=10;
SetDefaultMode("walk to"); //edit if you want, but dont delete.

/**/////////////////////////////////////////////////////
/**/DefineTemplateVariables();
/**/SetMode("default");
/**/GUIOff(MAPS);
/**/}
/**/
/**/function repeatedly_execute() {///////////////////////////////////////////////////Repeatedly Execute
/**/    // put anything you want to happen every game cycle here
/**/////////PUT YOUR SCRIPTS HERE IF POSSIBLE///////////


/**/////////////////////////////////////////////////////
/**/
/**/  if (IsGamePaused()!=1) {
/**/   CheckDefaultAction();
/**/   UpdateActionBar();
/**/   }
/**/  if (IsGUIOn(MAPS)){//it moves the gui where the name of what is under the mouse is written in map rooms.
/**/   int guiposx, guiposy, height, namelenght, space;
/**/   string buffer;
/**/   guiposx=mouse.x;
/**/   guiposy=mouse.y;
/**/   GetLocationName(mouse.x,mouse.y,buffer);
/**/   namelenght=StrLen(buffer);
/**/   height = speechfontheight;
/**/   if ((namelenght*speechfontwidth)>=guiMAPSwidth){
/**/     space=guiMAPSwidth/2;
/**/     height=(speechfontheight*2)+2;
/**/     }
/**/   else space=namelenght*speechfontwidth/2;
/**/
/**/   if (mouse.x>320-space) guiposx=320-space;
/**/   if (mouse.x<space) guiposx=space;
/**/   if (mouse.y>200-height) guiposy=200-height;
/**/   SetGUIPosition(MAPS,guiposx-(guiMAPSwidth / 2),guiposy);
/**/   }
/**/ //change the arrows in the inventory to show if you
/**/ //can scroll the inventory:
/**/  if (game.top_inv_item > 0)     //if invent. can scroll up
/**/    SetButtonPic(MAINGUI,9,1,invUparrowONsprite);  
/**/  else
/**/    SetButtonPic(MAINGUI,9,1,invUparrowOFFsprite);  
/**/  if (game.top_inv_item < game.num_inv_items - (game.num_inv_displayed-1))   //if invent. can scroll down
/**/    SetButtonPic(MAINGUI,10,1,invDownarrowONsprite);  
/**/  else
/**/    SetButtonPic(MAINGUI,10,1,invDownarrowOFFsprite);
/**/}


Its really upseting that I can no longer test my game to start with. Nothing should have changed between upgrades of the editor. Any ideas?
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Wed 28/04/2004 19:29:25
Sorry to repost, but I'm stuck. Is avo or Proskrito around lately?
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scorpiorus on Wed 28/04/2004 22:12:57
And what about the content of the global on_event() function? :P
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Thu 29/04/2004 00:25:08
This?

#sectionstart on_event  
function on_event (int event, int data) {
 if (event == ENTER_ROOM) MoveToWalkableArea(GetPlayerCharacter());
}
#sectionend on_event  
Title: Re:Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scorpiorus on Thu 29/04/2004 04:19:10
Yeah, what it if you temporary rename it to, say, function on_event_off (int event, int data) and see if it helps at all?
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Sun 02/05/2004 16:12:19
I'm sorry everyone. I just assumed since the first room was Intro that that must have been the room with the bad code since I assumed it was opening first, and not another room that was scripted to be the first room. My PlayableChar was to start in room 4, but I had forgotten that I told him to, so in that room was the conflicting code.  Thank you all for your patience through my oblivous-ness.   :-[

Something new did crop up though....
---------------------------
Adventure Game Studio
---------------------------
An internal error has occured. Please note down the following information.
If the problem persists, contact Chris Jones.
(ACI version 2.61.735)

Error: run_text_script1: error -1 (Runtime error: wrong number of parameters to exported function 'unhandled_event') running function 'unhandled_event'
---------------------------
I did a search in my global script for the run_text_script1 and it didnt find it.
What happens in the room, is that I start in my starting position, and if I look at my inventory, it crashes, or if I try and walk anywhere it crashes.
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: strazer on Sun 02/05/2004 17:14:13
The unhandled_event function requires parameters in newer AGS versions, so the function should look like

function unhandled_event (int what, int type) {
// ...
}

regardless whether you use these parameters or not.
Similarly, if you have imported it into the script header, change it to

import function unhandled_event(int what,int type);
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Mon 10/05/2004 20:50:18
any chance of un updated DOTT styled template? the previous one wont work for the same reasons as the other old ones (FOA, MI), but your new FOA and MI do work well with the newest ags version.
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Proskrito on Tue 11/05/2004 20:52:56
Quote from: Scummbuddy on Mon 10/05/2004 20:50:18
any chance of un updated DOTT styled template?
yes, as soon as i can get a new computer (hopefully soon), i'll update the templates, and try to improve them a bit.
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Tue 11/05/2004 20:53:58
that would seriously be great. and i hope any images you may have been working on can be moved to your new computer...  ;)  ;D
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: MarvinS on Tue 18/05/2004 09:27:13
I found a bug in the FOA template.
I was unable to perform an action to an object with the left mouse button (but it works with the rigth button).

Here is my fix :

In the global script

Replace

else if (GetHotspotAt(mrx-GetViewportX(),mry-GetViewportY())==0) SetMode("default");

by

else if ((GetHotspotAt(mrx-GetViewportX(),mry-GetViewportY())==0) && (GetObjectAt(mrx-GetViewportX(),mry-GetViewportY())==-1)) {SetMode("default");}

I hope this will help somebody  ;)
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: on Fri 28/05/2004 18:40:28
I'm sorry to sound like an idiot... but how do I use the MI2 GUI? I can't seem to import it and I can't seem to open it as a game in AGS either (it only looks for *.dta files).

I'm sure there's a really obvious answer... sorry!

I can't wait for the updated version with scrolling!!

Thanks.

Edit: Figured it out: It's a GAME TEMPLATE!! :)
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: on Fri 28/05/2004 19:39:18
All new problem. I exported the GUI and imported it into my 640x480 game but it says there's a problem with the line:

    if (button == 0)  SetMode("give");

Apparently it doesn't know what "SetMode" is. Blimey, this coding stuff sure is complicated :/
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Fri 28/05/2004 20:19:18
Related to MI2 template
I have tried a couple different variations upon the following

Ã,  // script for hotspot7: Walk to hotspot
if (MovePlayer(301,110)==1) // Start going to coords 100,300 and if
{Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // the player does not abort do:
//SetCharacterView(EGO,9);
//AnimateCharacter(EGO,0,0,0);
SetCharacterFrame(EGO,GUYPICKUP,0,0);
Wait(20);
ReleaseCharacterView(EGO);
NewRoomEx(7,225,35); //go to room 4 at these coordinates
}


but sometimes, if my guy is walking and i click on my hotspot with intentions to go to walk to the hotspot, do an characterframe, and then go to the new room, he'll stop walking wherever he is, and do the char frame, and then the new room will be called. but the weird thing is, is that it doesn't always work this way. sometimes he'll make it all the way to the hotspot before doing his char frame change and then new room.

this also happens when i dont call a char frame change, but as the char is walking and ill click on a hotspot, he'll instantly transport to the new room without him reaching his destination. should i add in a conditional if char is on the hotspot?

I just feel its worth mentioning because it doesn't always work, which kinda bugs me. After just testing and refreshing my memory, I have found it most often happens if you don't move after coming into a new room, and then clicking on a new hotspot.
Any ideas?
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: on Mon 05/07/2004 20:18:34
Could someone post the newest DOTT/MI2 interface please?  The link is dead, I'm afraid...

If hosting is an issue, please instant message me at nurikosbuns, I would be happy to host for everyone and I have plenty of bandwidth and space to use.
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Mon 05/07/2004 20:37:14
heres the link:
http://www.freewebs.com/skimbleshanks/templates.htm

and if anyone can help with my problem, id be more than appreciative (two posts up)
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Proskrito on Tue 06/07/2004 15:55:55
I'm working on a new version of the templates,(have it almost finished) which (at least i think) should be less buggy.
In order to make it somewhat 'backwards compatible', i'd like to know which template features you have used, like what template functions you have used, if you have used any template global variables in anything in your game, if you have used the $ character instead the > one in extensions...; anything you customized, or anything related to the template that should be working the same, please tell me.

(scummy, i've tried your problem with the new template, and it doesnt seem to happen. would it be much trouble upgrading to the new one? i could help you if you want)

Thanks for the offer Borborygmus : ) , i'll consider it, as the server where they were uploaded erased my rar files, so i might contact you whenever i finish them.
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: on Wed 07/07/2004 04:49:58
Thanks, Scummydead!

Quote from: Proskrito on Tue 06/07/2004 15:55:55Thanks for the offer Borborygmus : ) , i'll consider it, as the server where they were uploaded erased my rar files, so i might contact you whenever i finish them.

Feel free to do so.  Thanks for making something so cool.

email: borborygmus at combogods dot com
AIM: nurikosbuns
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: artphobia on Thu 08/07/2004 11:08:14
Quote from: Proskrito on Tue 06/07/2004 15:55:55
I'm working on a new version of the templates...


:Rubs hands together: ;D
I REALLY look forward to the DOTT template update.  Also if you need a second place/mirror site to host the coming files I can help you also Proskrito.  I get 3gb a month bandwidth so it should be fine on there also.  But anyways I mostly wanted to give ya a boost and say "thank you".


SELF INTRO
I haven't posted before but, have been reading alot about using ASG.  I grew up with these games (like most people here I am sure) and have always wanted to create my own so it feels GREAT to finally get that chance.  I've really scripted any thing before but, from reading it doesn't seem too terribly hard just alot to rememeber.  Still that's why I printed the manual out.  I like to think of the biggest / most compliacted designs when doing my artwork... so the game I am starting to work on will be just that.

Title: New SCUMM template (MI2)
Post by: Proskrito on Fri 30/07/2004 00:13:40
the SCUMM templates were giving strange bugs that i couldnt find, and since i started making the templates AGS has been improved (and i have improved my AGS skills ; D ), so i thought it was time for a revision.
Here is the new MI2 and FOA templates for testing, i hope them to be less buggy and all that:

http://usuarios.lycos.es/golfapagina/templates/

read the documentation for changes and stuff.
(hopefully DOTT one will be done soon)

Any comments or errors and such, or if you want to upgrade from an old template and dont know exactly how, please tell me : )

I hope somebody find it useful! : )

EDIT: Updated MI2 and added FOA
Title: Re: SCUMM templates - UPDATED 30-7-04
Post by: on Tue 03/08/2004 23:08:08
??? I have played games like Pirate Fry 3 and Cirque de Zale, and now really want to use one of your SCUMM templates, but i don't know how to use .rar files. please help ???
Title: Re: SCUMM templates - UPDATED 30-7-04
Post by: Proskrito on Wed 04/08/2004 00:27:09
rar is a compression format, like zip. you can download winrar here: http://www.rarlabs.com/download.htm and extract the files : )
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: on Wed 04/08/2004 10:40:02
Ah thanks!! ;D
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: BlackMan890 on Sat 14/08/2004 19:16:06
 :o it's 16bit color
:'(

I am creating a game in 256 col so i can't use your template :(
I am forced to create my own template ofcourse it is going to be HELL tough anyway i can maybe use some of your code, anyway, thanks for all the hard work
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Privateer Puddin' on Sat 14/08/2004 19:23:05
Can you not just reimport all the graphics?
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: BlackMan890 on Sat 14/08/2004 19:47:00
Quote from: Privateer Puddin' on Sat 14/08/2004 19:23:05
Can you not just reimport all the graphics?

You mean i reimport all of the graphics with palette??

that could be possible
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: wackojacko on Sun 15/08/2004 10:08:04
Hey Proskrito,

I used the new MI2 template and I really think it's great except for one thing. If I use this command for a character:

function character3_a() {
  // script for character3: Talk to character
if (Go()==1) //Start going to the object and if the player
   {      // does not abort do the following:
   AnimateCharacter(PIRATE, 0, 10, 1);
//Show pick up animation
   AddInventory(2); //add item #
   RunDialog(1);
   }
}

The hero will start walking to the character ad if I KEEP MY CURSOR on the character it will Animate and run a dialog. BUT if I do this and the hero starts walking towards the character and I MOVE MY CURSOR TO SOMETHING ELSE, nothing happens when the hero gets to the character!
I also had the same problem with something else, but I don't remember it anymore. Do you know what's the problem?
(I really like your template!  ;D)

Tim
Title: Problem with 640x480
Post by: on Fri 20/08/2004 18:37:24
hi!

i wanted to use 640x480 with your FOA-Template, but I found a big problem:

when I try to move the inventory window in MAINGUI down or I move the whole GUI down, the scroll-buttons of the inventory don't work anymore. Are there any resolutions for this problem or do I have to use 320x200??
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: BlackMan890 on Tue 24/08/2004 17:10:31
Proskrito, could you pm me to give me all the sprite so i can save it in 255 col? please
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Proskrito on Tue 24/08/2004 20:14:34
i dont have them, but you can extract them from the template (right click on sprite->extract sprite to file, or, right click on sprite-> copy sprite to clipboard, then paste it in you graphics program)
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: on Wed 25/08/2004 12:26:50
Holy crap Proskrito... Do you have any clue how much this makes me want to shoot myself in the foot? Or the face? I'm not making a GUI to compete with you, but yours is way better than mine. Time to start rescripting again. ARG! The more I look, the more I see that is good. I can still think of some things you don't have that I want/need (but aren't really that important). Well, with school and stuff I'm pretty busy but as soon as I get my inventory worked out, I'm going to start learning AGS more better than I know it now. Well, I know AGS well enough to do simple stuff, but this kind of GUI ain't simple...
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Bernie on Wed 25/08/2004 14:11:41
It's not really as hard as you may think, you just need to get the logic worked out.

I'm not very experienced with AGS at all, but still managed to code a GUI with the following features which, I think, are the most important things about the Lucas Arts GUI:

-Cancelable commands (clicking somewhere else to abort)
-Rightclick triggering a certain action

For cancelable commands, you'll have to:

1. store the desired location (coulf be retrieved from properties)
2. store the 'clicked at' position using mouse.x and mouse.y
3. store the action that will be executed when the player reaches the destination
4. compare the position of the character to the stored destination in repeatedly execute
5. do a processclick using the stored 'clicked at' position

Additionally, you could use another property value to make the character face a certain direction upon arrival at the destination.

Also, remember to take the view offsets into account for scrolling rooms.

For rightclicks to trigger actions, you could just use properties. Compare to the property of each location in your script when rightclicking, and trigger the action depending on that property value.

That's what it boils down to, at least. Not sure if this helps you as I've been quite vague here.Ã,  Ã, :-[
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: BlackMan890 on Wed 25/08/2004 19:21:13
monkey0506, if you want to make a good GUI  template, then i would suggest you to make a RPG template that would Rock for many people here

oh Proskrito, when i use your mi2 GUI i notice that there is a restart GUI, but how do i call that?
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: wackojacko on Fri 27/08/2004 14:02:21
you can restart by pressing f8,
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Scummbuddy on Sat 28/08/2004 01:04:19
going along with restarting, proskrito, did you code something that would cause this. I was originally going to post it as a possible bug for CJ, but I'd like to run it by you first.



Are you sure the "SetRestartPoint();" is still working? I'm using proskritos newest FOA template , but after checking the code, I don't believe that that is causing the problem. First I put it in my first rooms' before fadein interactions, and that didn't work,so I put it in after fade in interactions. I have now tried "repeatedly execute" and that didnt work. both times when it was 'before fadein' and 'after fade in' the "SetRestartPoint();" was not within a cutscene marker, but for some reason, within playing the game, you are brought to when your playable character is first playable.
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Proskrito on Sat 28/08/2004 20:44:40
mmm i dont think the template has anything to do with that, the only restart code is RestartGame(); when you press Y while in the restart GUI.
I know nothing about SetRestartPoint(), though.
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Scummbuddy on Sat 28/08/2004 21:13:31
alright, thats cool. ill just repost the possible bug report where cj will see it. thanks!
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Scummbuddy on Tue 09/11/2004 17:37:06
Hey, Proskrito, do you think you could do an updated version of your templates, bringing them up to date with the most recent released version?

I'm still getting some random problems, like when I run the DOTT template, it works up until i try and move a character from their starting position around the screen. I get this:

-------------
(ACI version 2.62.756)

Error: run_text_script1: error -1 (Runtime error: wrong number of parameters to exported function 'unhandled_event') running function 'unhandled_event'
---------------

Thanks again.
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Mats Berglinn on Thu 11/11/2004 07:23:31
You're not alone on that Scummbuddy. That happens for me too.
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: strazer on Thu 11/11/2004 12:15:28
Doesn't

Quote from: strazer on Sun 02/05/2004 17:14:13
The unhandled_event function requires parameters in newer AGS versions, so the function should look like

function unhandled_event (int what, int type) {
// ...
}

regardless whether you use these parameters or not.
Similarly, if you have imported it into the script header, change it to

import function unhandled_event(int what,int type);

work?
Title: Re: Monkey Island 2, DOTT, FOA Templates - UPDATED 7-2-04
Post by: Scummbuddy on Thu 11/11/2004 18:12:26
Quote
function unhandled_event (int what, int type)

If I put this in place of my function unhandled_event(), i get 'type already defined' and when i take out the int, i get a parse error. now, is proskrito already using type for something else, so that variable must be renamed, and then i can put type back in the parameters?
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Proskrito on Fri 12/11/2004 01:07:55
sorry, i've been a bit busy from some time now, (and seems like thats going to continue for some more time : / ) I worked on the new templates during last summer, but i didnt release the new dott template because there were some issues, and (mainly) because i hadnt done the documentation.
i think its at least useable, so if you want to try what i had done here it is:
http://usuarios.lycos.es/golfapagina/templates/
you can read the documentation from the other templates, although there are some things only in the dott one that obviously are not commented on those, so if you have some problems or questions i'll try to answer them as soon as possible.

sorry for all the inconveniences!
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Bombadil on Sun 28/11/2004 18:44:30
What's the difference between DOTT, FoA and MI2 templates? They all have the same actions.

Anyway, is any of them working without bugs?
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Proskrito on Mon 29/11/2004 09:18:09
1- what's the difference between DOTT, FOA and MI2 lucasarts games?
i tried to copy these games.
just in case, remember that a template is not a gui.
2- without bugs? i dont think so. But if you find a bug, post it here and i'll try to correct it.
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Bombadil on Mon 29/11/2004 14:13:15
Thanks Proskrito!

Then I will try one of those templates...
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: on Wed 11/05/2005 15:36:22
i d/l MI2 template from the last link u postet, proskrito and got the message "that GUI is already set for a local (or global)" and so on.
i got 2.7 and am absolute (obsolete  ;D) no clue of scripting. just wanted to tell you that.

peace
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Lazarus on Thu 30/06/2005 09:23:43
I'd like to start with that *raises hand in the air* by saying that i am quite new at this, only 3 weeks.

I started with version 2.62 and using Proskrito's MI2 templatev2.0c which works fine, i then downloaded version 2.7 with the same template and got the gui,objects and hotspot global errors which i have sorted out.

The problem i then got was with:

Line 445:Ã,  Function declaration has wrong number of arguments to prototype.

function GoToCharacterEx(int charidwhogoes, int charidtogo, int direction, int xoffset, int yoffset, int NPCfacesplayer, int blocking){
Ã,  //Goes to a character staying at the side defined by 'direction': 1 up, 2 right, 3 down, 4 left
Ã,  //and it stays at xoffset or yofsset from the character. NPCfacesplayer self-explained.
Ã,  // blocking: 0=non-blocking; 1=blocking; 2=semi-blocking.
Ã,  // returns 1 if player arrived.
Ã,  int playerchar,charidx,charidy,playerx,playery;
Ã,  if (charidwhogoes!=GetPlayerCharacter() && blocking==2) blocking=0;//npcs cant perform semi-blocking actions
Ã,  playerchar=charidwhogoes;
Ã,  charidx=character[charidtogo].x;
Ã,  charidy=character[charidtogo].y;
Ã,  playerx=character[playerchar].x;
Ã,  playery=character[playerchar].y;
Ã,  Ã,  Ã,  int arrived = 1;
Ã,  Ã,  Ã,  if ((Offset (playerx, charidx) > xoffset) || (Offset (playery, charidy) > yoffset)){
Ã,  Ã,  Ã,  Ã,  if (direction==0){ // shortest way.
Ã,  Ã,  Ã,  Ã,  Ã,  if (Offset(charidx,playerx)>=Offset(charidy,playery)){ // left or right
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  if (playerx>=charidx) direction=2; //right
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  else direction=4; //left
Ã,  Ã,  Ã,  Ã,  Ã,  }
Ã,  Ã,  Ã,  Ã,  Ã,  else{
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  if (playery>=charidy) direction=3; //down
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  else direction=1;
Ã,  Ã,  Ã,  Ã,  Ã,  }
Ã,  Ã,  Ã,  Ã,  }
Ã,  Ã,  Ã,  Ã,  // calculate target position
Ã,  Ã,  Ã,  Ã,  if (direction==1) charidy-=yoffset;
Ã,  Ã,  Ã,  Ã,  else if (direction==2) charidx+=xoffset;
Ã,  Ã,  Ã,  Ã,  else if (direction==3) charidy+=yoffset;
Ã,  Ã,  Ã,  Ã,  else if (direction==4) charidx-=xoffset;
Ã,  Ã,  Ã,  Ã,  // move character
Ã,  Ã,  Ã,  Ã,  if (blocking==0){
Ã,  Ã,  Ã,  Ã,  Ã,  MoveCharacter(playerchar,charidx,charidy);
Ã,  Ã,  Ã,  Ã,  Ã,  arrived = 0;
Ã,  Ã,  Ã,  Ã,  }
Ã,  Ã,  Ã,  Ã,  else if (blocking==1){
Ã,  Ã,  Ã,  Ã,  Ã,  MoveCharacterBlocking(playerchar,charidx,charidy,0);
Ã,  Ã,  Ã,  Ã,  Ã,  arrived = 1;
Ã,  Ã,  Ã,  Ã,  }
Ã,  Ã,  Ã,  Ã,  else if (blocking==2) arrived = MovePlayer(charidx,charidy);
Ã,  Ã,  Ã,  }
Ã,  Ã,  Ã,  if (arrived > 0){
Ã,  Ã,  Ã,  Ã,  // characters only face each other after the moving character arrived at the target point
Ã,  Ã,  Ã,  Ã,  if (NPCfacesplayer==1)Ã,  FaceCharacter(charidtogo, playerchar);
Ã,  Ã,  Ã,  Ã,  FaceCharacter(playerchar, charidtogo);
Ã,  Ã,  Ã,  }
Ã,  Ã,  Ã,  return arrived;
}

So i deleted this Function which then gave me the following error message

Line 500:Ã,  Wrong number of parameters in call to 'GoToCharacterEx'

GoToCharacterEx(GetPlayerCharacter(),charid,direction,defaultxoffset,defaultyoffset,NPCfacesplayer,blocking);

So i deleted this Function aswell then the template worked ok.

So i was wondering what exactly these functions did and are they important or not, in that can i get away without needing them?

Thanks in advance.
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Lazarus on Thu 30/06/2005 10:18:59
Bit of an update i think the problem was with the 'GoTo' command as i changed the line:

From
function GoToCharacterEx(int charidwhogoes, int charidtogo, int direction, int xoffset, int yoffset, int NPCfacesplayer, int blocking){

To
function CharacterEx(int charidwhogoes, int charidtogo, int direction, int xoffset, int yoffset, int NPCfacesplayer, int blocking){

And also the line:
From
GoToCharacterEx(GetPlayerCharacter(),charid,direction,defaultxoffset,defaultyoffset,NPCfacesplayer,blocking);

To
CharacterEx(GetPlayerCharacter(),charid,direction,defaultxoffset,defaultyoffset,NPCfacesplayer,blocking);

Don't know if this is correct or not, but it seems to work
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: Gilbert on Thu 30/06/2005 10:41:30
Hmmm is it possible that there's a line like:
import function GoToCharacterEx(blarghblarghblar...);
in the script header (Pressing ctrl-H in the editor will bring up the header), whose number of parameters doesn't match the number used in the function declaration?

Just a suggestion to check if it's the problem, I'm just too lazy to download the template and check it myself.
Title: Re: SCUMM templates - UPDATED 4-8-04
Post by: monkey0506 on Thu 30/06/2005 20:15:42
Just curious.  What was the purpose of dragging this up when there is clearly a sticky thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=7616.0) in the Beginner's forum?

I can see that these are your first posts in this forums, but...maybe you should pay better attention to dates, and try looking for a newer thread.