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

#1601
Just put similar code in the hotspot interaction, only with another unused GlobalInt.
The principle is the same.

It doesn't matter where you put the AnimateObject command, it doesn't have to be in the interaction of the object itself.
#1602
Why the new thread? Your previous one was just fine.

What part of the BFAQ entry don't you understand?

There's not one definitive way to end a game. Some people want to end the game when a certain score is reached, others if the player has done something within the story.

When the player does what he is supposed to do to end the game (for example use an inventory item on a certain hotspot), do what you want do to, for example displaying a winning message or running a cutscene, play a movie, whatever.
Then you can return to the first room, quit the game, whatever you want to do.

Let us know what the player in your game has to do to so he wins the game.
#1604
Are you sure it's not the music files themselves? What format are they?

Try moving the PlayMusicQueued functions around to see if it's always the same tracks causing the problem.
#1605
What resolution/color depth is the game?

Maybe the laptop screen doesn't support that particular resolution. Have you tried other games that use this resolution?
#1606
My pleasure. :)
#1607
Quote
or can I run the opening animation backwards with AnimateObjectEx?

Exactly.
Choose an unused GlobalInt between 0 and 499, then:

Code: ags

  if (GetGlobalInt(28) == 0) { // if the Globalint is 0 (the default)
    // open door:
    SetObjectView(0, 2);
    AnimateObject(0, 8, 0, 0); // run animation forwards
    SetGlobalInt(28, 1); // set GlobalInt to 1 so the door will be closed on next interaction
  }
  else { // if GlobalInt is not 0, i.e. 1
    // close door:
    AnimateObjectEx(0, 8, 0, 0, 1, 0); // run animation backwards
    SetGlobalInt(28, 0); // reset GlobalInt to 0 so door will be openend next time
  }
#1608
Hm, the only thing I can think of is maybe the GUI is popup modal, thus pausing the game while it's displayed and not allowing the background frame to be set.

Do you turn off the gui before or after calling init_game?

Also, try setting the GUI to normal.
#1609
Using the interaction editor:

Conditional - If a variable is set to a certain value (0)
  (Opening door animation)
  Game - Set variable value (1)
  Stop running more commands
Conditional - If a variable is set to a certain value (1)
  (Closing door animation)
  Game - Set variable value (0)
#1610
Is the main menu also the first room? I don't quite understand.

Is the start game button a hotspot, object or gui button? Is its interaction triggered at all? Check with a Display command.
#1611
QuoteWhen I use SetBackgroundFrame in my script nothing happens.

What's the exact code you're using and where have you put it?
#1612
QuoteIs currentitem an int or string here?

It's an int, the index of the currently selected item.
#1613
The text is not displayed only if there's a voice speech file defined and present.
#1614
Hm, looks okay to me, no braces problems.

The buttons are on the INVENTORYA gui, yes?

To check if the script gets executed at all, do this:

Code: ags

	if (button == 9) {
		Display("Voice only, no text");
		SetVoiceMode(2);
	}
	if (button == 10) {
		Display("Both voice and text");
		SetVoiceMode(1);
	}


If the messages are displayed, how do you know the SetVoiceMode commands are not working?
What does (not) happen in your game?
#1615
In the "GUIs" pane of the editor, when you select the button, does the entry "Left click" in the little white window say "Run Script"?

If it does, are you sure they're buttons 9 and 10 ("Object 9" in title of the little window)?

If you are, can you please post the whole content of your interface_click function?
#1616
You have to decide what the variable is used to represent.

The way you have it now, you have seperate variables for each item, so ltunic itself holds the amount for this item, so you do ltunic++;

But if you go the array way, ltunic is only the index where to find the amount of the item in the itemcount array, i.e. you have to do itemcount[ltunic]++;
(Since the index of each item will stay the same, it's simpler to just use an LTUNIC define as in my example above.)

Again: The array itemcount holds the amount for all 3 items and you access each amount via the item's index (0 to size_of_array-1):

itemcount[0]; // amount of first item
itemcount[1]; // amount of second item
itemcount[2]; // amount of third item

Just be sure never to access the array out-of-bounds, i.e. if you have an array of size 3 as in my example above, the valid index is 0 to 2, so DON'T do:
itemcount[3]++; // out-of-bounds error
#1617
Have you set the buttons' "Left click" action to "Run Script"?
#1618
I know.

int itemcount[3];

is an array, basically 3 ints in 1. One int for each item. Each int holds the amount for each item. You can access the int of each item through the [index].
#1619
Then how about something along the lines of:

Code: ags

// main script header

#define LCHILI 0
#define GCHILI 1
#define LTUNIC 2


Code: ags

// main global script

int itemcount[3];


Code: ags

currentitem = LTUNIC;


Code: ags

DeleteItem() {
  itemcount[currentitem]--;
}
#1620
Have you already tried compressing it or is 50MB the raw file size?

QuoteYour best bet is to use a split archive so that people on dialup can get the game in chunks (5 or 10 megs, or whatever)

Aside from speech and music packs, I don't understand why splitting up a game in multiple parts is better for dial-up users.
I imagine most of them use a download manager that can pause and resume anyway?
SMF spam blocked by CleanTalk