Troll Bridge Riddle

Type: Assembly Brain
Level: not in gallery
Pages: 6
Description: Found in the Troll Bridge Riddle Assembly. When the player approaches the bridge from either side the troll is activated and asks a riddle. Get it right and you can pass. Get it wrong and he attacks you. Please note this assembly has a bug in it and the troll acts as if the bridge is non collidable, falls through the bridge and then walks through it if he attacks.

To fix the bug.

Save the brain from the troll to the brain gallery. Delete the troll. Place another troll from the Character gallery. Insert your saved brain. Turn Brain is active to off. Go into the brains of the two bridge ends and change the iwp from missing object to your new troll.

The bug is caused by saving the character and the bridge as a combined assembly. So even if you were to fix this or alter the brains and save the whole thing as an assembly the bug will reoccur.

Kode

Bridge ends

@Stone Ramp Trigger

  1. WHEN [started to][in trigger zone][player][or][in trigger zone][global][objvar:player]
  2. …WHEN [not][iwp:Troll][brain is active]
  3. …/…WHEN DO [iwp:Troll][objvar:player][equals][it]
  4. …/…WHEN DO [iwp:Troll][objvar:active camera][equals][iwp:Stone side camera]
  5. …/…WHEN DO [iwp:Troll][brain is active][equals][true]

same the other side except it activates the Wood side camera

Troll

page 1 @Setup

  1. WHEN [once]
  2. …WHEN DO [team][equals][team 2]
  3. …WHEN DO [objvar:player][brain is active][equals][false]
  4. …WHEN DO [objvar:active camera][brain is active][equals][true]
  5. WHEN DO [turn][toward][objvar:player]
  6. WHEN DO [play sound][missing prop][everywhere] // this does not work. Change the missing prop tile for one of the troll sounds
  7. WHEN [countdown timer] DO [switch page][next page]

page 2 @Greeting

  1. WHEN DO [objvar:player][turn][toward][me]
  2. WHEN DO [letter box]
  3. WHEN DO [say][text: Me love eat…]
  4. WHEN [is using controller][or][is using touch]
  5. …WHEN DO [display button][A][screen bottom center][without frame]
  6. …/…WHEN [else]
  7. …/…/…WHEN DO [display][icon:space][screen bottom center]
  8. WHEN DO [display][text:OK][screen bottom center][x large font]
  9. WHEN [button:A][pressed][without virtual controller] DO [switch page][next page]

page 3 @Riddle

  1. WHEN DO [letter box]
  2. WHEN DO [say][text:You in room…]
  3. WHEN [is using controller][or][is using touch]
  4. …WHEN DO [display button][icon:x][screen bottom left][without frame]
  5. …WHEN [else]
  6. …/…WHEN DO [display][left shift][screen bottom left]
  7. WHEN DO [display][text:Fireplace][screen bottom left][x large font]
  8. WHEN [is using controller][or][is using touch]
  9. …WHEN DO [display button][icon:A][screen bottom center][without frame]
  10. …WHEN [else]
  11. …/…WHEN DO [display][space][screen bottom center]
  12. WHEN DO [display][text:Match][screen bottom center][x large font]
  13. WHEN [is using controller][or][is using touch]
  14. …WHEN DO [display button][icon:B][screen bottom right][without frame]
  15. …WHEN [else]
  16. …/…WHEN DO [display][return][screen bottom right]
  17. WHEN DO [display][text:Candle][screen bottom right][x large font]
  18. WHEN [button:X][pressed][without virtual controller][or][left shift][pressed]
  19. …WHEN DO [textvar:answer][equals][text:The Fireplace…]
  20. …WHEN DO [switch page][page:@Incorrect answer]
  21. WHEN [button:A][pressed][without virtual controller]
  22. …WHEN DO [textvar:answer][equals][text:The Match…]
  23. …WHEN DO [switch page][page:@Correct answer]
  24. WHEN [button:B][pressed][without virtual controller][or][return][pressed]
  25. …WHEN DO [textvar:answer][equals][text:The Candle…]
  26. …WHEN DO [switch page][page:@Incorrect answer]

page 4 @Correct answer

  1. WHEN DO [letter box]
  2. WHEN [duration timer][2]
  3. …WHEN DO [objvar:player][emote][talk]
  4. …WHEN DO [objvar:player][say][textvar:answer]
  5. WHEN [countdown][2]
  6. …WHEN [once] DO [emote][Agree]
  7. …WHEN [duration timer][2] DO [say][text: …][type on speed][2][x large font]
  8. WHEN [countdown timer][4]
  9. …WHEN [duration timer][2] DO [say][text:You right…]
  10. WHEN [countdown timer][6]
  11. …WHEN [once]
  12. …/….WHEN DO [emote][Sad]
  13. …/…WHEN DO [play sound][missing prop][everywhere] // does not work – add sound yourself
  14. …WHEN [duration timer][2] DO [say][text:Me so hungry…]
  15. WHEN [countdown timer][8]
  16. …WHEN [duration timer][2] DO [say][text:OK bye]
  17. WHEN [countdown timer][10]
  18. …WHEN DO [switch page][page:@Allow passage]

page 5 @Incorrect answer

  1. WHEN DO [letter box]
  2. WHEN [duration timer][2]
  3. …WHEN DO [objvar:player][emote][talk]
  4. …WHEN DO [objvar:player][say][textvar:answer]
  5. WHEN [countdown][2]
  6. …WHEN [once] DO [emote][Agree]
  7. …WHEN [duration timer][2] DO [say][text: …][type on speed][2][x large font]
  8. WHEN [countdown timer][4]
  9. …WHEN DO [play sound][missing prop][everywhere] // does not work. Add your own sound here
  10. …WHEN [duration timer][2] DO [say][text:Bwahahaha…]
  11. WHEN [countdown timer][6]
  12. …WHEN [duration timer][2] DO [say][text:Me eat you now…]
  13. WHEN [countdown timer][8]
  14. …WHEN DO [objvar:player][brain is active][equals][true]
  15. …WHEN DO [objvar:active camera][brain is active][equals][false]
  16. …WHEN DO [push brain][Enemy Enrage] // Unfortunately this is hidden kode that we cannot see

page 6 @Allow Passage

  1. WHEN [page entered] DO [jump height][equals][1]
  2. WHEN DO [jump]
  3. WHEN [countdown timer][0.5]
  4. …WHEN DO [play fx][poof][on][me]
  5. …WHEN DO [objvar:active camera][brain is active][equals][false]
  6. …WHEN DO [objvar:player][brain is active][equals][true]
  7. …WHEN DO [destroy]

Alterations

Add a leave option

There is no way to not answer the riddle. If you want the player to have an option to leave and not try to cross the bridge add this kode

Troll

page 1 @Setup

Change line one to

  1. WHEN [page entered]

page 2 @Greeting

Add

WHEN DO [display button][icon:B][screen bottom right][without frame]
WHEN DO [ display][text:Leave][screen bottom right][x large font]
WHEN [button:B][pressed][without virtual controller] DO [switch page][page:@Player leave]

Add new page 7 @Player leave

  1. WHEN DO [objvar:player][turn][away from][me]
  2. WHEN duration][2] DO [objvar:player][move][away from][me]
  3. WHEN [not][iwp: Troll Bridge wood side][in trigger zone][objvar:player]
  4. …WHEN [not][iwp:Troll Bridge Stone side][in trigger zone][objvar:player]
  5. …/…WHEN DO [objvar:player][brain is active][equals][true]
  6. …/…WHEN DO [objvar:active camera][brain is active][equals][false]
  7. …/…WHEN DO [brain is active][equals false]

Add to each of the bridge ends

6. …/… WHEN DO [iwp:Troll][switch page][1]

Have the troll magically appear when you first step on bridge

Change properties of troll so visible is off

page 1 @Setup]
WHEN [page entered]  // or tile is once if you havent added the leave option
…WHEN [do play][poof][on][me]
…WHEN [countdown timer][DO [visible][equals][true]

page 7 @Player leave // if you added the leave option

5….WHEN [do play][poof][on][me]
6….WHEN DO [visible][equals][false]

 

Comments are closed.

Powered by WordPress.com.

Up ↑

%d bloggers like this: