Hi ! :)
I want to make my character fly to a certain place(hotspot 2) only if the player clicks on it with the pick up
I've made a walkable area (2) in the sky and I've set "change player view while on this area " to the "fly" view.
Then I've inserted this script in the room
// room script file
#sectionstart hotspot2_a // DO NOT EDIT OR REMOVE THIS LINE
function hotspot2_a() {
// script for Hotspot 2 (Hotspot 2): Pick up hotspot
RestoreWalkableArea(2);
}
#sectionend hotspot2_a // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart room_a // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
// script for Room: Player enters room (before fadein)
RemoveWalkableArea(2);
}
#sectionend room_a // DO NOT EDIT OR REMOVE THIS LINE
But the walkable area isn't restored if the player picks hotspot2 :-[
What can I do?
How do you know it isn't restored? The code looks okay to me.
Put a Display("Test"); command in there to make sure the function is called at all.
Ah I got it! It's not Pick up I wanted but Interact. SorryÃ, ;D
But now I would like to convert it with "if player press inventory item 3 on the hot spot 2 restore walkable area 2".
I've tried to do it with the interaction editor but it doesn't work :(
Go the hotspot's interactions, then double-click on "Use inventory on hotspot", then add your RunScript action.
The script should look like this:
if (player.ActiveInventory==iKeycard) { // e.g.
RestoreWalkableArea(2);
...
}