Jibble

Author Topic: Tumbleweed Door Issue  (Read 185 times)

Tumbleweed Door Issue
« on: 05 Apr 2021, 10:24 »
Hello,

I have recreated some doors with the code from the demo room2

and it seem to work, but on one case I have a door that goes to the left instead of up, the problem here is, when you open the door and then click it, to walk through, the player goes up a bit and then changes the room. But he should go to the left, into this door, instead of up. Is that somehow "hardcoded" in the engine / template or how can I fix this?

The help section on tumbleweed-doors does not mention the walk-through-animation before the room is changed.

Re: Tumbleweed Door Issue
« Reply #1 on: 05 Apr 2021, 20:53 »
Another problem regarding this topic:

As far as I know it is supposed to work like this:
you design your backgrounds with the doors closed, and then add the opened door as an object, that gets hidden or unhidden in the script..

In my case when the door is open, the open-door-sprite is rendered in the foreground (over the player in z-order), and therefore the player walks behind it, it looks weird and is immersion killing, it should be on a layer under the player, is this possible or am I doing something wrong?


edit: regarding first post, Ive fiddled around with scripts and hotspot extensions and now cant recreate the issue, not sure really what I did

Re: Tumbleweed Door Issue
« Reply #2 on: 06 Apr 2021, 08:04 »
Each object has a baseline used to determine the drawing order. You can move it further up so the open door sprite appears behind the player.
Fail at Floaty Rog' now!  still having to deal with what games are going through

Re: Tumbleweed Door Issue
« Reply #3 on: 06 Apr 2021, 15:36 »
It works,  :grin:

Thank you @Khris, this was an easy fix



Another thing that bugs me with doors at the moment is this:

open/close is working fine, but if you Look at it, the player always says "a solid door", I would like to define my own sentence when the player looks at a door, and not let him use the same predefined speech from the unhandled-event strings for every door. When I use this code the player says my text but still also says the "solid door" sentence


Spoiler: ShowHide
Code: Adventure Game Studio
  1.  function hDoor3_AnyClick()  
  2.   {
  3.   if(Doors.AnyClick(40, oDoor3.ID, 192, 91, eDirectionUp, 8, 213, 127, eDirectionUp) == 0 ) Verbs.Unhandled();
  4.    
  5.   // OPEN  
  6.   if(Verbs.UsedAction(eGA_Open))
  7.  { player.Say("Event Anyclick Open works");
  8.  }
  9.  
  10.   // LOOK AT
  11.   if(Verbs.UsedAction(eGA_LookAt))
  12.  { player.Say("Event Anyclick Look works.");
  13.  
  14.  }
  15.  
  16.  
  17.    
  18. }
  19.  
  20.  





What is wrong with it or how do I get rid of it?

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Re: Tumbleweed Door Issue
« Reply #4 on: 06 Apr 2021, 16:20 »
Well, you are telling it check if it's anyclick and run "Verbs.Unhandled()", which of course it is.
Then you check if it's Open, it'll be true if you used Open, and then you check for Look, which will be true if you use Look.

What you want is:

{
  If Open ... do this
  else if Look ... do that
  else  ... do Verbs.Unhandled()
}

Which translates in: Check if it's open, run if it is and end the block. If it's not Open check if it's Look, run the code if it is and end the block. If it's not Open nor Look, then run the Verbs.Unhandled() and end the block.
There are those who believe that life here began out there...

Re: Tumbleweed Door Issue
« Reply #5 on: 06 Apr 2021, 16:23 »
You can use  Doors.SetDoorStrings(...);  to change the text, but that's rather supposed to be used to change the default messages and less to implement individual door descriptions.

However you can probably use something like this:

Code: Adventure Game Studio
  1. function hDoor3_AnyClick()  
  2. {
  3.   // LOOK AT
  4.   if(Verbs.UsedAction(eGA_LookAt)) {
  5.     player.Say("A custom description of the door."); // just a regular "look at hotspot" interaction so far
  6.   }
  7.  
  8.   // all other verbs
  9.   else if (Doors.AnyClick(40, oDoor3.ID, 192, 91, eDirectionUp, 8, 213, 127, eDirectionUp) == 0) Verbs.Unhandled();
  10. }
Fail at Floaty Rog' now!  still having to deal with what games are going through

Re: Tumbleweed Door Issue
« Reply #6 on: 06 Apr 2021, 16:51 »
Your code works perfect :grin:

Thanks again, very good job, much appreciated!