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_"
Checking for player character being at a specific place 2
-
- Posts: 15
- Joined: Sun May 07, 2023 10:16 am
- Jay_H
- Posts: 4039
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Checking for player character being at a specific place 2
I have moved the topic to Quest Development
Launching an action based on not being in a place is fairly buggy and unreliable. It caused a lot of problems for Warm Ashes, which is what convinced Kamer to use C# instead of the quest system for its future versions. No one has found any reliable method yet.

Launching an action based on not being in a place is fairly buggy and unreliable. It caused a lot of problems for Warm Ashes, which is what convinced Kamer to use C# instead of the quest system for its future versions. No one has found any reliable method yet.
-
- Posts: 66
- Joined: Wed Jun 29, 2022 8:54 am
Re: Checking for player character being at a specific place 2
The only suggestion I would make is to perhaps make a separate quest that deals with the goblin attack, inside the current quest. So in your current quest have:
Then in the spawning quest have something like:
It might work.
Code: Select all
Place _tavern_ local tavern
pc at _tavern_ set _attavern_
variable _attavern_
_meeting6_ task:
clicked npc _tavernwoman_
say 1050
log 1051 step 2
_goblinattack_ task:
when _attavern_ and _meeting6_
hide npc _tavernwoman_
place npc _tavernknight_ at _tavern_
say 1052
run quest Goblin then _continue_ or _continue_
_continue_ task:
end quest
Code: Select all
Clock _goblinattack_ 01:00
Clock _end_ 05:00
_begin_ task:
when pc exits anywhere
start timer _goblinattack_
_goblinattack_ task:
create foe _goblin5_ every 0 minutes 1 times with 100% success
start timer _end_
_end_ task:
end quest
-
- Posts: 15
- Joined: Sun May 07, 2023 10:16 am
Re: Checking for player character being at a specific place 2
Ok thanks for the replies. I have tried to no avail to make something similar work that's cinematic. I just settled on activating the goblin attack when the pc attempts to leave the city. That will do! I'm now aware after some research the limitations of this. It will open up a lot more possibilities if a way to check the pc is simply "outside" is ever implemented though. As far as I'm aware, we can basically check for exiting cities/dungeons only, not buildings like taverns and shops and such, so spawning enemies in town is only possible with timers (causing them to spawn inside on occasion and not ideal), or upon entering/exiting a settlement.