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 - strazer

#1161
Advanced Technical Forum / Re: AGS 3D
Wed 15/06/2005 22:09:38
Sure, thanks! :)
#1162
Advanced Technical Forum / Re: AGS 3D
Wed 15/06/2005 21:21:03
Could you or someone else please upload the latest version of the demo somewhere? As jayssite says, the links are broken.
#1163
1. Do you mean you want the GUI at the bottom not to show in a specific room?
If so, just turn it off when entering the room ("Player enters screen (before fadein)" interaction) and on when leaving the room ("Player leaves screen" interaction).

2. Have you tried the "Hide player character" checkbox in the room settings?
#1164
My pleasure. :)
#1165
QuoteI made sure this is outside all other functions.

Wrong. Script code has to be put in functions, otherwise AGS won't know when to execute it. What function depends on when you want the message to be displayed.

Does the player have to interact with a door object that leads to room 4? If so, to create the function for this event, go to Room Editor -> Objects -> Select the door object -> "Interaction..." -> Double-click "Interact object" -> "Run script" -> "Edit script..." -> Paste above script
#1166
No prob. :)

Check the BFAQ for all your newbie needs: AGS Beginners FAQ
#1167
General Discussion / Re: MP3 looping problem
Wed 15/06/2005 16:56:24
To my knowledge you can make mp3s loop. Any silences at the start or end of the mp3 file are likely the result of your music program or its export feature rather than the codec.
Can't you export as wav from FL and trim the file manually in CEP, then encode it there?
I recommend ogg too, just because it's completely free.
#1168
If you're using AGS v2.7 and have "Enforce object-based scripting" checked in the General settings, you won't be able to use old-style functions.
So either use
  object[0].Visible = false;
instead of ObjectOff(0);
or uncheck "Enforce object-based scripting" in the General settings.
Using new-style coding is recommended though. You can enter old function names in the search box in the help file, it redirects you to the new commands.
#1169
You can't just put the script somewhere into the room script. It has to be inserted into a function:

Quote
FOURTH!:  Under First time player enteres screen, go to Run Scipt at the very top of the function list, a window will open, insert the following:

Room Editor / Settings -> "i" button -> Right-click "First time player enters screen" -> "New action..." (or double-click if it's the first action you add) -> "Run script" -> "Edit script..." -> NOW paste the code -> Ok ok ok ok etc.

Press the room script button ("{}") again and you will see that a function named room_a or something has been created by the interaction editor and your code is contained in there.
#1170
It doesn't matter what you call the variable. You can rename "object" to "flubby" if you like, you just have to replace every occurance of "object" in the GetLucasSavegameListBox function with the same word. I would use "object_id", for example.
#1171
QuoteAnother Problem i am having now is with the GUI, i can't seem to get the talk box to fit correctly, there are always blue lines on the top, and its the same size as the other default ones. I measured it at 32/27.

It looks like your new icon has a transparent background, showing the GUI beneath. And since the GUI has the border color set to blue, you see the blue lines.
Set the GUI's border color (/foreground color) to 0 to remove the blue border.
#1172
QuoteMy question is, is there a way to display a message if my player character has not been in room 3?

That's quite easy using scripting:

Code: ags

  if (HasPlayerBeenInRoom(3) == 0) { // if player has NOT been in room 3 yet
    Display("No!");
  }
  else { // if player has been in room 3
    NewRoom(4);
  }
#1173
How about using GetSaveSlotDescription?

"GetSaveSlotDescription (int slot, string buffer)

"Gets the text description of save game slot SLOT into the provided BUFFER. If the slot number provided does not exist this function returns 0, if successful it returns 1."
#1174
Quote from: Gilbot V7000a on Wed 15/06/2005 02:31:15
Actually since V2.6 of AGS:
Quote
- Added ability to have only left/right walking frames for
   characters (just delete all frames in loop 0).

You don't actually need any scriptings to disable the up/down loops.
#1175
I've just noticed you posted the same in the main tech forum. No crossposting please!

I have deleted your message and my reply. Here it is again:

Correct. As stated in the AGS v2.7 upgrading guide:

Quote
Is there anything else I should watch out for?

Because of the new additions, the script language has more reserved words than before. For example, words like "gui", "object" and "hotspot" are now reserved (since they are used to access the global arrays). If your script uses any variables with these names, it will no longer work. You'll need to change the variable name in order to compile.

So you'll have to rename the affected variables everywhere in the script, for example:

Code: ags

function SomeFunction(int gui, int hotspot) {
  Display("GUI is ", gui);
  GuiOff(gui);
  int a = hotspot + 3;
}


becomes for example

Code: ags

function SomeFunction(int gui_id, int hotspot_id) {
  Display("GUI is ", gui_id);
  GuiOff(gui_id);
  int a = hotspot_id + 3;
}
#1176
Yes. In the function import definition, simply set a default value to the variable like this:

Code: ags

// main script

function DoSomething(int vara, int varb) {
  // do something
}


Code: ags

// script header

import function DoSomething(int vara, int varb=3); // varb will be optional
#1177
Hooray! Thank you! :)
#1178
Do #defines work in dialog script? I think not. (See also this tracker entry).
#1179
I still need somewhere to sleep. magintz, do you still have space left?
#1180
Not directly, it seems, but you could calculate which frame is currently displayed:

Code: ags

  //...
  int timepassed;
  while (oDoor.Animating == true) {
    int frame = timepassed / 20; // 20: delay used in oDoor.Animate call
    Wait(1);
    timepassed++;
    if (frame == 0) { /* tint */ }
    else if (frame == 1) { /* tint more */ }
    // etc.
  }


(Untested)

Edit: Ah, yes, or by checking the currently displayed sprite slot. Good idea.
SMF spam blocked by CleanTalk