use inventory, but not on anything? (candle)

Started by spook1, Thu 24/04/2003 21:54:40

Previous topic - Next topic

spook1

Two simple questions:


1st:

Is there a way to prevent all interactions from happening?
I want the player to enter a room that is totally dark. The player must not be able to do anything (walk, look, interact with hotspots etc.) until he is using a candle and light is there to see.
Howe can I turn off all (inter) actions except for the "Use Inventory" action?


2nd:
How can I get the room to change (in this case, turn on the light using flashlight plugin) by using an inventory (flashlight).
I cannot define to use the inventory on something, I need to use it "on the world". The repeatedly exccute seems to work but is there a simpler solution?

Any simple suggestions?

Kind regards

Martijn

Proskrito

to the 2nd question: i think you want the same i posted here: http://www.agsforums.com/yabb/index.php?board=6;action=display;threadid=5211.
i managed to do it, but in a very ugly way. if nobody tell you better way, i could post here what i did, but i'm sure it's not the best sollution.

spook1

Please.e what your scrappy way is.

mabe we should post this question in the technical forum ?

greetings

Martijn

RickJ

QuoteHow can I get the room to change (in this case, turn on the light using flashlight plugin) by using an inventory (flashlight).
You can do something like this:  Make hotspot 1 cover the whole room.  Create an interaction for the hotspot "use inventory" and put the following doe into that interaction.

int room_is_dark;

function room_xx() {
  // Use inventory on hotspot #1, covers whole room
  if character[GetPlayerCharacter()].activeinv == FLASHLIGHT) {
     TintScreen(0, 0, 0);
     RestoreWalkableArea(1);
     room_is_dark=0;
  }
}

Create "player enters before fade-in interaction" interaction with the followin code.

function room_xx() {
  // Player enters screen before fade-in
     TintScreen(95, 95, 95);      //  Make room dark
     RemoveWalkableArea(1);   // Don't allow player to move
     room_is_dark=1;
}

Now for all other interactions in the room, code them something like this.

function room_xx() {
  // Any room interaction
  if (room_is_dark) {
     DisplaySpeech(GetPlayerCharacter(), "I would but I can't see a damm thing!");
  }
  else {
      // what ever you would do when the light is on
      // goes here
  }
}

Proskrito


SMF spam blocked by CleanTalk