SCUMM templates - UPDATED 4-8-04

Started by Proskrito, Fri 13/06/2003 22:38:08

Previous topic - Next topic

Scummbuddy

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.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Proskrito

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.  

Jimi

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.  :-\

Proskrito

#23
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 ;)

Red_Armadillo

For me it says that it was made with an earlier or beta version, anybody know why?
PEPSI kicks Coca~Cola's Butt!

Scummbuddy

Cause it was.  The last time Proskrito updated the template was with an earlier version.  You shouldn't have any problems with it though.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Red_Armadillo

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
PEPSI kicks Coca~Cola's Butt!

The_Dragon

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).

The_Dragon

Oh...Thanks Proskrito for the FOA, MI2 and DOTT Scumm.
Gracias :D

LuttiArts

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

skulls

Use a program like Netants for downloading that  ;)
Un francais parmis la comunauté AGS

Proskrito

#31
**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!  :)

Scummbuddy

Hey buddy, you know I'll give this a try tonight and let you know.  Thanks for all the work you do.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Barcik

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 for reference.
Currently Working On: Monkey Island 1.5

Proskrito

#34
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.

a-v-o

Proskrito:
My server is currently down, but I can send you the script by eMail.

BlackBaron

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  
---------------------------
"Do you thirst for knowledge no matter the cost?"
            -Watrik, master glassblower

Proskrito

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)

BlackBaron

Yeah, that was it, now it works, thanks a lot.
"Do you thirst for knowledge no matter the cost?"
            -Watrik, master glassblower

Scummbuddy

#39
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/
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SMF spam blocked by CleanTalk