Checking for player character being at a specific place 2
Posted: Sat Oct 21, 2023 4:38 am
Already asked by haloterm in 2020 but I can't seem to implement this properly.
Essentially I'm trying to spawn enemies when not in a location anymore. Specifically when leaving the tavern after 1 hour. I thought it might be a problem with " when not _attavern_ do _goblinattack2_ " since I cant find any instance of someone having done "not at" a place, but I tried like is written below " when _attavern_ do _goblinattack2_ " and even within the tavern it doesn't work. I have tried a few different things with and without variables and checked the accuracy of the format on every line related to this part of the quest, so I'm a kind of stumped. Probably is something obvious though...
Place _tavern_ local tavern
Clock _goblinattack_ 01:00
pc at _tavern_ set _attavern_
variable _attavern_
_meeting6_ task:
clicked npc _tavernwoman_
say 1050
log 1051 step 2
start timer _goblinattack_
_goblinattack_ task:
when _attavern_ do _goblinattack2_
_goblinattack2_ task:
create foe _goblin5_ every 0 minutes 1 times with 100% success
hide npc _tavernwoman_
place npc _tavernknight_ at _tavern_
say 1052
I am working from this comment on haloterms post:
"-- Main task.
-- Start running _checkPlace_
start task _checkPlace_
-- Holds set/unset flag
variable _isAtPlace_
-- Update _isAtPlace_ (only if _checkPlace_ is set!)
_checkPlace_
pc at _DaggerfallCity_ set _isAtPlace_
-- Run when not at place
_example_
when not _isAtPlace_"
Essentially I'm trying to spawn enemies when not in a location anymore. Specifically when leaving the tavern after 1 hour. I thought it might be a problem with " when not _attavern_ do _goblinattack2_ " since I cant find any instance of someone having done "not at" a place, but I tried like is written below " when _attavern_ do _goblinattack2_ " and even within the tavern it doesn't work. I have tried a few different things with and without variables and checked the accuracy of the format on every line related to this part of the quest, so I'm a kind of stumped. Probably is something obvious though...
Place _tavern_ local tavern
Clock _goblinattack_ 01:00
pc at _tavern_ set _attavern_
variable _attavern_
_meeting6_ task:
clicked npc _tavernwoman_
say 1050
log 1051 step 2
start timer _goblinattack_
_goblinattack_ task:
when _attavern_ do _goblinattack2_
_goblinattack2_ task:
create foe _goblin5_ every 0 minutes 1 times with 100% success
hide npc _tavernwoman_
place npc _tavernknight_ at _tavern_
say 1052
I am working from this comment on haloterms post:
"-- Main task.
-- Start running _checkPlace_
start task _checkPlace_
-- Holds set/unset flag
variable _isAtPlace_
-- Update _isAtPlace_ (only if _checkPlace_ is set!)
_checkPlace_
pc at _DaggerfallCity_ set _isAtPlace_
-- Run when not at place
_example_
when not _isAtPlace_"