Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Proskrito

#101
Don't think so. Alt-x is hard-coded to abort the game, i think.
But i could be wrong, so anyone correct me then, please : )
#102
i think it does not really need so much work. you could make a custom function, before all default functions, like:
Code: ags

function SetActionText(int gui, int object){
  string text;
  int mode=GetCursorMode();//store current cursor mode in 'mode' variable
  if (mode==MODE_WALK) StrCopy(text, "Walk to ");//Copy "Walk to " to action text
  else if (mode==MODE_LOOK)  StrCopy(text, "Look at ");//Copy "Look at " to action text
  else if (mode==MODE_PICKUP)  StrCopy(text, "Pick up ");//Copy "Pick....
  else if (mode==MODE_USE)  StrCopy(text, "Use "); //or "Interact with "
  else if (mode==MODE_TALK)  StrCopy(text, "Talk to ");
  else if (mode==MODE_USEINV){// If using an inventory item on something
    string invname;
    StrCopy(text, "Use ");//Copy "Use " to action text
    GetInvName(character[GetPlayerCharacter()].activeinv, invname); //Store inventory item name in 'invname' variable
    StrCat(text, invname);// add name to action text
    StrCat(text, " with ");// add " with " to text
  }
  StrCat(text, "@OVERHOTSPOT@");//add the name of what the mouse is over.
  SetLabelText(gui,object,text); //Set the text to the specified label
} 


Then, in the repeatedly execute, you just put:
Code: ags

SetActionText(YOURGUI, YOUROBJECT);

replacing YOURGUI and YOUROBJECT with the GUI name / object number of the label you want to put the text in.
This way doesnt look so dificult, and you keep your repeatedly_execute cleaner
#103
Ah i see, thats a problem i never came across, but some people did. When i finish the documentation i'll release the new version of the template, and _hopefully_ it will fix those problems. If you want, you could send me the game and i'll update it to the new version, and see if the problem goes away : ).
#104
Quote from: Konador on Thu 15/07/2004 17:35:48
Is there any way to turn AlwaysGoToHotspots=1; off for only a specific object.

My problem is this;
The item is on a "walk behind" object. There is walkable area behind it. When I interact with the object, the character moves to the walkable area behind, as that is closer to the object co-ords that the walkable area in front. I need to set the co-ords manually for only this object, but would like AlwaysGoToHotspots to be enabled for the rest of the objects, hotspots, and characters.

Is this possible?

Yes, instead of putting the extension with the character '>', put it with '$', like lever$x instead lever>x
#105
Also, if you want the ascii codes of characters or numbers or so, you could write the character inside single quotes, (always in uppercase in case of 'letters'(?) ), to check in the on_key_press or IsKeyPressed functions, like:
if ( keycode == 'Y' ) ....
this way is more readable i think, and you dont have to look up the number, but it only works with those type of keys. (whichever you can write in the editor might work, im not sure though)
#106
if you are using a scumm template, there is a variable at the top of the global script called "AlwaysGoToHotspots". if it is 1, thecharacter will go to wherever you click, and then do the interaction. If in the interaction you make him go to where the cursor is, then it would do what you say.
If thats your problem, you have 3 solutions:
1- set that variable to 0, and then you'll have to script all the 'go to' actions;
2- remove the script that makes the player character go to the cursor, and let the template do it;
3- if you want only that object to ignore the automatic 'go to' action, put a extension in its name, like the default action ones, but with character $ instead of >, like 'door$o'. This way, the template will act like if the variable 'AlwaysGo...' would be 0 just for this object.
(you can read the documentation that came with the template)
If thats not the problem, tell us more about it. : )
#107
what do you mean with a 'Bohemian rhapsody remake' ?
#108
you can make decissions by checking who is the player character:

if (GetPlayerCharacter()==BOY) {
do something;
}
else { // if its the girl
do other things
}
#109
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.
#110
no, the functions in the global script are used by the template, so if you delete them it wont work. You can delete/replace rooms, inventory items,characters...  (an their interactions)
#111
i think you should place that in the 'character enters screen after fadein' interaction of that room
#112
replace his frames. Read the Beginners' FAQ.
#113
just replace the things in the game with yours. The 'game' it has is meant to show examples of how the template works.
#114
maybe in repeatedly execute? something like:

if (IsGUIOn(INVENTORY)==1 && GetGUIAt(mouse.x, mouse.y)!=INVENTORY)
GUIOff(INVENTORY)
#115
QuoteI remember CJ explained about this issue in some other thread, but I'm just too lazy to dig that out.
do you mean this one? : http://www.adventuregamestudio.co.uk/yabb/index.php?topic=12394.0
QuoteAnd I don't think that's really such important, considering the effort on implementing it and it's not a complete programming package, #define was just there to give you some small convenience.
Ah ok, i just wanted to know if i should forget about it forever : )
#116
Sorry if its a silly question, or if its technically imposible, or whatever, but i dont know anything about scripting languages, nor how defines work:

Would it be possible to use a define inside another? like:
#define NUMBER 5

and later:
#define OTHER_NUMBER NUMBER

so OTHER_NUMBER would take the value of NUMBER
or even
#define OTHER_NUMBER NUMBER+3

so it would be like 5+3
I know its not possible now, but could it be in the future?
#117
Quotedoes anyone know of a working link where i can get a working lucasarts template?
oh f*ck, my web space provider deleted all my .rar files  :'(

AGT files are templates, just copy them in AGS folder, start a new game, and it should appear besides the default and blank templates.
#118
thats how i made it, if i remember well. What i meant, is that, ie:
in the interface_click function, when you click the GIVE button, you have:
Code: ags

if (button==GIVEBUTTON){
Ã,  Ã,  SetCursorMode(2);
Ã,  Ã,  SetGlobalInt(80,2);
}

then, you should change the script to somethong like this:
Code: ags

if (cur_mode == 4) {
 if (GetGlobalInt(80) == 2) StrCat(madetext,"Give "); //give
 else StrCat(madetext,"Use "); //use
 GetInvName (player.activeinv, buffer);
 StrCat(madetext,buffer);
 if (GetGlobalInt(80) == 2) StrCat(madetext," to "); //give
 else StrCat(madetext," with "); //use
}

maybe the same with cursor mode 2, if globalint 80 == 2, write give, if not, write use.

And then, imagine you want something to happen if you give some item to a character, then you would do in the 'Use inventory on character':
Code: ags

//use inventory on character
if (GetGlobalInt(80)==2){
 if (character[X].activ....
 //put here all the interactions with give
}
else{
//put here interactions with 'use'
}

i hope i made more sense! : )
#119
i think you could share the mode USE_INV (cursor mode 4) and then check if the player chose give or use with the global int.
Instead of using mode 9 for give, use initially mode 2 (mode use), and then you'll be able to select a inv. item.
Don't forget to check with the globalint which mode was used, or 'give' and 'use' will do the same.

#120
or also you could use each hotspot twice, depending on the coordinates it could be easy to check which one was clicked
SMF spam blocked by CleanTalk