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

#741
It's mine. I just have to write the documentation, then I will release it officially.
The module has two functions:

  InvItemAnimation.Start(InventoryItem *theinvitem, int view, int loop, int delay, optional RepeatStyle repeat);

  Example:
    InvItemAnimation.Start(iTorch, TORCHVIEW, 0, 10, eRepeat);

and

  InvItemAnimation.Stop(InventoryItem *theinvitem, optional bool keepcurrentframe)

  Example:
    InvItemAnimation.Stop(iTorch, false);
#742
You're welcome. And good work! :)
#743
1.) Put the first brace directly after the struct title, otherwise SpinCombo doesn't auto-complete:
  struct SpinCombo {
instead of
  struct SpinCombo
  {

2.) Why put variables in the struct at all? Just leave them in the main module script if they won't be accessed outside of it.

3.) According to the readme, "You will need to adjust the first three variables in SpinCombo.InitCombo()".
The user shouldn't have to edit the module. What if you release an updated version? Then the user would have to edit it again, or worse, forgets that he has to.
You should require the user to call SpinCombo.SetCombo from in his script beforehand and he shouldn't have to delete the three lines from the module. Just raise an error if no combination was given.

The same applies to SpinCombo.Completion(). The user shouldn't have to put what happens when the lock was solved into the module.
I'm not sure how to best do this since you can't call functions from the global script in a module. How about the user having to put it like this into the GUI click event:

Code: ags

  // script for GUI button

  if (SpinCombo.SpinLeft() == true) {
    ComboLockFiguredOut(); // call function defined earlier in global script
    // or put completion code here, but then you would have to duplicate it for the other spin direction
  }

(and same for spin right GUI button)

SpinCombo.SpinLeft and .SpinRight would spin the lock and then return true if the combination was solved and false if not.

4.) For consistency's sake, decide on a name: Name the zip SpinCombo as well or (what I'd prefer) name the struct and module SpinLock.
#745
No, filename.gue (in contrast to filename.gui which is a whole set of GUIs) is a single GUI that you can import by selecting the GUIs pane, then choosing from the menu "GUI" -> "Import another GUI...". I think you need AGS v2.7.
#746
Do you still have the faulty one? If so, please zip up the game folder minus the Compiled folder and upload it somewhere so CJ can investigate the problem.
#747
Completed Game Announcements / Re: MOTLPAA
Tue 29/11/2005 17:12:15
Regarding 1.: AGS v2.71 Beta 4 added the "noloopcheck" keyword to bypass script loop checks:

Code: ags

function noloopcheck RandomizeMaze() {
  //...mega-loop here
}
#748
Cool! Glad I could help. :)
#749
(Cute avatar!)

Try this (AGS v2.7 required):

- Give the GUI button a script name in the GUI editor, I use "NameOfYourButton" for this example
- Choose menu "Script", "Edit global script...".
- Paste this to the very end:

Code: ags

function repeatedly_execute_always() {

  GUIControl *theControl = GUIControl.GetAtScreenXY(mouse.x, mouse.y); // get the GUI control at the current mouse cursor position
  if (theControl == null) { /* do nothing */ } // if no GUI control there, do nothing
  else if (theControl.AsButton == NameOfYourButton) { // but if the GUI control is the button
    gOldgui.Visible = false; // turn off the old GUI
    gNewgui.Visible = true; // and turn on the new GUI
  }

}


(If there is already a repeatedly_execute_always function in your global script (use the script editor's search function to check), just paste the code in between in there.)

Also, you'll have to adjust "gOldgui" and "gNewgui" to the actual names of your GUIs, for example "gBlargh" if your GUI is called "BLARGH" etc.
#750
Do any other help files like the Windows ones work?
What version of Windows and what version of Internet Explorer do you have?

I've found this thread at another forum: http://phorums.com.au/showthread.php28766
Does this help?
#751
There are no for-loops yet.
#753
Candle probably means using background frames to animate room backgrounds but for intros and such you can better use videos (PlayVideo function) or FLI/FLC animations (PlayFlic function).
#754
I think Audacity can encode to both.
#755
What AGS version?
Is it always the same sound files?
Have you tried with other sound effects?
Does it also happen when the sound effects are MP3 or OGG?
Does changing the sound device in the game setup help?

Edit:
Oh, and what script commands do you use to play the files?
#757
Beginners' Technical Questions / Re: Quit game
Wed 23/11/2005 23:34:26
You can't directly, you'll need to make a custom GUI.
#759
You probably just want to make the character walking blocking, so it doesn't start walking but then change rooms immediately.
"Blocking" means the game waits for the action to finish before executing the next command in the script. You have to use the "eBlock" parameter of the Character.Walk function.

So, in conclusion, try this:

Code: ags

  // script for room: Player enters room (before fadein)

  cTontete.x = Random(120); // place TONTETE at random position
  cTontete.y = Random(98);

  // or, if you also want him to be put into this room EVERY TIME the player enters it:
  //  cTontete.ChangeRoom(player.Room, Random(120), Random(98)); // put TONTETE in this room at a random position


Code: ags

  // script for room: Player enters room (after fadein)
  // or put it in "Player enters room for the first time" if you want TONTETE to walk only the first time, then never to be seen again

  int ran = Random(2);
  if  (ran == 0)  cTontete.Walk(160, 84, eBlock);
  else if (ran == 1) cTontete.Walk(220, 120, eBlock);
  else cTontete.Walk(30, 40, eBlock);
  // with the eBlock parameter, the script waits for the character to reach his destination before executing the following command:

  cTontete.ChangeRoom(-1); // place character TONTETE outside of room
SMF spam blocked by CleanTalk