Drawbridge

Hi everyone


Having a problem with making a functional drawbridge


i cant seem to make it do the following:


when talking to guard you get 2 choices:


1) lower down bridge


or


2) raise up bridge


- when select "lower bridge"; the drawbridge graphic should animate to the "open/bridge down" graphic, and then the tiles that the bridge covers should be passable


- at this state, the guard should reply when choosing the choice "lower down bridge" with respond that the bridge is already down, and then nothing change.


when selecting "raise up bridge"; the drawbridge graphic should animate to the "close/raise bridge up" graphic, and the responding factors afterwards as with the guard (just opposite off course)


Any help would be really appriciated.


Ill keep trying myself, but if anyone could find the time, or relating links that would help out, i would be gratefull.


if i find a solution myself i will update as sson as possible.


Kind regards


Anders / spaceace
Create your drawbridge opening/closing images as a character sheet, use the doors and chests as an example.  Make the sprite two tiles high, with the fully closed drawbridge taking up the top tile, and the fully open drawbridge taking up the bottom tile.


Allocate a switch to the drawbridge status - ON means drawbridge is down (if the game begins with it up).


Add your drawbridge event with two pages.  Page 1 will have no conditions and the sprite will be the closed drawbridge.  Page 2 will be conditioned by the drawbridge status switch, the sprite will be the open drawbridge, and check the THROUGH box.


On the guard event, set the commands as follows:

Code:
Conditional Branch: Switch [?: Drawbridge Status] is ON
  Show Text: The drawbridge is already down
Else
  Play SE: Drawbridge Opening
  Set Movement Route (select Drawbridge Event) (wait for completion)
    Turn Left
    Wait 2 Frames
    Turn Right
    Wait 2 Frames
    Turn Up
  Control Switches: [?: Drawbridge Status] = ON
End

You might notice that the movement route is very similar to the one created when you make a quick event for a chest or door, which is why I said to use those character sheets as an example when creating your sprite.

Original thread: https://forums.rpgmakerweb.com/threads/drawbridge.63296/