(Solved) Prevent character from walking to specific part of screen

Started by viktor, Fri 18/12/2020 12:34:55

Previous topic - Next topic

viktor

Hello,

is there any way of preventing a character from walking to a specific part of the screen without a specific inventory item. Let's say a dark part of a room without a candle or something? I tried using hotspots but it only works if the player clicks on the hotspot. If I click on the far right part of the screen he will still walk to the dark area without turning back.

EDIT: Used Crimson Wizard's suggestion.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

Crimson Wizard

Make a separate walkable area, disable it in room's "enter" event, and enable only when they have an item.

See in the manual: RemoveWalkableArea, RestoreWalkableArea, Character.HasInventory

You may also make a hotspot over same area, so that when player clicks on it game tells that they cannot go there yet, and then disable that hotspot as they got the candle (Hotspot.Enabled property).

Khris

Or use a Region and use its "player enters region" event.

SMF spam blocked by CleanTalk