**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")
Sweeet. I'll test it out man, and I'll let you know how its going. Thanks.
I'll add it to my collection. Holler if you don't want me to.
I have tried it and... Yeah, it's very useful. Nice&Cool work mate! Thanks for this template! :D
-Cheers
:o
i...
wow...
I...LOVE it...
I think its great you've gone to all this trouble too.
Nice one :)
Very clever idea to use the ">" in the strings to do the default modes too :)
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)
downloaded... but i have class. ill get back to you. thanks!
How can I change manually (by scripting) the extensions of a hotspot or an object, Proskrito?
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
Hmm... cursor 5... doesn't really look like a cross... more like Hoagie. ;D
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.
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.
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?
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!! :)
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!
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.
I Love You Man! :D
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
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)
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.
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.
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. :-\
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 ;)
For me it says that it was made with an earlier or beta version, anybody know why?
Cause it was. The last time Proskrito updated the template was with an earlier version. You shouldn't have any problems with it though.
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
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).
Oh...Thanks Proskrito for the FOA, MI2 and DOTT Scumm.
Gracias :D
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
Use a program like Netants for downloading that ;)
**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! :)
Hey buddy, you know I'll give this a try tonight and let you know. Thanks for all the work you do.
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.
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.
Proskrito:
My server is currently down, but I can send you the script by eMail.
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
---------------------------
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)
Yeah, that was it, now it works, thanks a lot.
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/
Bleh... 404. :P
Damn you lycos!
---------------------------
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.
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'
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
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
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();
}
Should I just update to the latest and greatest version and see how it goes? I don't see a problem with whats above.
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.
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.
You asked this in the beginners forum, and it will be answered there.
Ok, sorry.
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?
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.
ah, simply remove the 'return xxx;' line, i didnt know what i was doing, and i tried to return a string : / ; )
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.
you can leave them //'ed, the return lines do nothing
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.
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..
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!
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?
Thanks a lot Proskrito :)
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?
Sorry to repost, but I'm stuck. Is avo or Proskrito around lately?
And what about the content of the global on_event() function? :P
This?
#sectionstart on_event
function on_event (int event, int data) {
if (event == ENTER_ROOM) MoveToWalkableArea(GetPlayerCharacter());
}
#sectionend on_event
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?
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.
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);
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.
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.
that would seriously be great. and i hope any images you may have been working on can be moved to your new computer... ;) ;D
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 ;)
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!! :)
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 :/
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?
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.
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)
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.
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
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.
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
??? 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 ???
rar is a compression format, like zip. you can download winrar here: http://www.rarlabs.com/download.htm and extract the files : )
Ah thanks!! ;D
: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
Can you not just reimport all the graphics?
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
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
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??
Proskrito, could you pm me to give me all the sprite so i can save it in 255 col? please
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)
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...
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.Ã, Ã, :-[
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?
you can restart by pressing f8,
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.
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.
alright, thats cool. ill just repost the possible bug report where cj will see it. thanks!
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.
You're not alone on that Scummbuddy. That happens for me too.
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?
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?
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!
What's the difference between DOTT, FoA and MI2 templates? They all have the same actions.
Anyway, is any of them working without bugs?
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.
Thanks Proskrito!
Then I will try one of those templates...
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
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.
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
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.
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.