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

#2441
I suppose you need .NET runtimes for this?

I want to install as little as possible, so assuming they work like the VB runtimes, what are the names of the required DLLs so I can put them into the application directory as needed?
#2442
First of all, thanks for the updates! :)

But I've found another problem:

It seems character coordinates don't stay within (curve-shaped) walkable areas.
For example, if you use the GetScalingAt function with player.x and player.y in rep_ex to report the current scaling, sometimes it doesn't work if you walk along the edge of the walkable area.

I've whipped up another demo game here (62kb).

Btw, I've always wondered what the "Edit this .AGSGame" file is for?
#2443
Currently, ambient sounds are replayed from the beginning if you use PlayAmbientSound to play the same file (when re-entering the room for example, with game.ambient_sounds_persist=1).

If you PlayMusic the same music file, it just continues playing.
Would it be possible to do the same for ambient sounds?

Thank you!

EDIT: Fixed since v2.61
#2444
Actually the room script (Room Editor/Settings/{} button) contains all the hotspot interaction functions. But these functions have to be created with the Interaction Editor first.

Ok, here it is, step by step:

- Go to Room Editor / Settings
- Press the button labelled "{ }"
- Put this in there:
   int sequence=0;
- Close the window (and tell it to save)

The following you have to do for each of the 4 hotspots:

- Go to "Room Editor" / "Areas" and select "Hotspots" from the drop-down menu
- Select the hotspot
- Press the button labelled "Interaction..."
- Double-click on "Interact with hotspot"
- Select "Run script" from the drop-down menu
- Press the "Edit script..." button

- Put this in hotspot 1:
   if (sequence == 0) sequence++;
   else sequence = 0; // wrong combination, so start again

- If you are editing hotspot 2, put this in there:
   if (sequence == 1) sequence++;
   else sequence = 0; // wrong combination, so start again

- This in hotspot 3:
   if (sequence == 2) sequence++;
   else sequence = 0; // wrong combination, so start again

- And this in hotspot 4:
   if (sequence == 3) { // correct combination so
      AddInventory(5); // give player the ice cream
   }
   else sequence = 0; // wrong combination, so start again

- Exit and save

Sorry, can't make it any clearer than that.
#2445
When I try to play any video (mpg or avi) with PlayVideo("video.mpg",1,1), my game crashes when the video ends (by itself or via skip):

An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x00416E6F ; program pointer is +7, ACI version 2.61.744, gtags (6,0)

This doesn't happen in all rooms.
I have tried several combinations of skip and flag settings and disabled all rep_ex functions but I wasn't able to narrow it down to what could be causing this.
Any ideas?

Edit: Yep, that was it.
#2446
I run RC 1, it's in my manual. ???
#2447
Since v2.61 Beta 4:

QuoteAdded SetGUIObjectEnabled script function to explicitly disable a GUI button.
#2448
Critics' Lounge / Re: BG could use some c&c
Thu 06/05/2004 22:06:23
Nice, although I'm not too fond of the pink color. :)

I especially like the wall texture. How did you do it?

Shouldn't the door handle be the other way around? You know, the short part attached to the door?

And please, don't let the game start in this room. I'm sick of seeing heroes's bedrooms... ;D
#2449
Indeed, an exemplary post, eric.

Scuthbert, could you please remove the pic from your first post and just provide a link?
It's over 500kb in file size, think of the dial-up users.
It would fix the thread width too, and I think eric's smaller version is enough for most people.

Thank you.
#2450
Hm, I would probably do it this way (for MP3/OGG music files):
Global script

int oldmusictrack=1; // stores number of current music track
int oldmusicpos=0; // stores position in current music track

Global on_key_press (see above)

  if (keycode == 368) { // F10
   if (IsMusicPlaying()) { // music is on
      oldmusictrack = GetCurrentMusic(); // save number of current music track
      oldmusicpos = GetMP3PosMillis(); // save current position in music track
      StopMusic(); // stop current music track
   else { // music is off
      PlayMusic(oldmusictrack); // re-play previous music track
      SeekMP3PosMillis(oldmusicpos); // jump to position where it left off
   }
  }

EDIT: Changed int oldmusictrack=0 to int oldmusictrack=1 so that when the game starts without music playing and the user presses F10, the first music track starts playing.

P.S.: Glad I could help. :)
#2451
QuoteBTW, I meant that if I was going to use a script comand like MyOpenDoor, or something, the script would not recognise that term would it?

Correct.
For it work, you would need a custom function named myOpenDoor().

If you have several interactions that all require the same code, you can put this code into a custom function that you can reuse for other interactions.

For example, if you want the door to open both if you use a key on it or you just interact with it:

Room script (anywhere but other functions, preferrably on top)

function myOpenDoor() { // define custom function
  if (GetGlobalInt(1) == 1) {
    PlaySound(2);
    NewRoomEx(2, 50, 150);
  }
}

Interact with door

  myOpenDoor(); // execute the above function

Use inventory on door

if (player.activeinv == 2) { // player used key on door
  myOpenDoor();
}

In this example if have put the GI condition in the myOpenDoor function as well, since it is used by both interactions.
#2452
No.
If you take a look a the room script itself, any interaction looks basically like this:

#sectionstart object1_a  // DO NOT EDIT OR REMOVE THIS LINE
function object1_a() {
  // script for object1: Any click on object
  DisplaySpeech(EGO, "What a nice object!");
}
#sectionend object1_a  // DO NOT EDIT OR REMOVE THIS LINE

In the Interaction Editor, you only see the part between the braces { }
So the script functions already have a beginning and an end, so to speak, and you just don't see them in the Interaction Editor.
#2453
You're welcome. :)

What do you mean, "end scripts"?
If you want to abort the execution of the rest of a script, afaik, you can write
return;
#2454
QuoteIs it interaction with door --> run script?

Correct.

The myOpenDoor(); part was just a placeholder for whatever you want to do when the player opens the door. You could do sophisticated door animations here for example.
I suggest you keep it simple at first and maybe just go to the new room:

if (GetGlobalInt(1) == 1) {
  PlaySound(2); // plays sound2.mp3 (door opening)
  NewRoomEx(2, 50, 150); // puts player in room 2 at coordinates x=50 and y=150
}

QuoteDon't I somewhere have to state what exactly My Door is?

I don't know what you mean exactly.
Of course you have to draw a hotspot or put an object where your door is. Then press the "Interaction" button and put the above lines in
"Interact with hotspot" --> "Run script" for example.
#2455
2) For example:

Room script (Button {} in Room Editor/Settings)

int sequence=0;

Then in "Interact with object" or "Interact with hotspot" (depending on whether your colors are objects or hotspots):

Color 1

if (sequence == 0) sequence++;

Color 2

if (sequence == 1) sequence++;

Color 3 (last color of this combination)

if (sequence == 2) {
   // player gets item here
}
else sequence = 0;

EDIT: dikla asked me to clarify things:

You have to use scripting for this. If your colors are hotspots:

- Go to "Room Editor" / "Areas" and select "Hotspots" from the drop-down menu
- Select the hotspot for color 1 for example
- Press button "Interaction..."
- Double-click on "Interact with hotspot"
- Select "Run script" from the drop-down menu and press the "Edit script..." button
- Put the above code in here

"// player gets item here" is just a comment, you have to replace it with what you want to happen if the player gets the combination right.
You can add an inventory item with the AddInventory command. Look it up in the manual.
#2456
Yep, it's a 3 room demo, I've provided the link above.

I think the remake is just on hold officially, but why don't you ask them: http://www.agdinteractive.com/
#2457
Do you know Tierra's SQ2 demo?

#2458
True, but with two "Run Script" actions you don't have to call the dialog_request function.
#2459
And you are sure that when you skip the cutscenes, the dialog doesn't come up?
#2460
But surely you start it in "Player enters room (after fadein)"?
SMF spam blocked by CleanTalk