Quest target distance

Post » Tue May 17, 2011 6:41 am

Is there a way to determine the distance between the player and the current quest target seen on the map, or atleast get its location? Maybe through using GetActiveQuest. Thanks!
User avatar
OJY
 
Posts: 3462
Joined: Wed May 30, 2007 3:11 pm

Post » Tue May 17, 2011 3:14 pm

http://cs.elderscrolls.com/constwiki/index.php/GetDistance
User avatar
GEo LIme
 
Posts: 3304
Joined: Wed Oct 03, 2007 7:18 pm

Post » Tue May 17, 2011 4:52 am

I'm aware of GetDistance, but I don't know what to use as object to determine the distance between the player and the current quest target. GetActiveQuest provides the current quest, but not the location of the quest target. I'm guessing the location of the quest target is known somewhere, as there's a console command MoveToQuestTarget. Maybe there's a default quest marker I could use?
User avatar
Campbell
 
Posts: 3262
Joined: Tue Jun 05, 2007 8:54 am

Post » Tue May 17, 2011 2:39 pm

Just give the quest target a reference id, if it doesn't already have one, and call that reference id. Example "TargetRef.getdistance player". May not be very accurate if the player and target are not in the same cell or world space though.
User avatar
Leah
 
Posts: 3358
Joined: Wed Nov 01, 2006 3:11 pm

Post » Tue May 17, 2011 8:39 am

The problem is that I don't know what the quest target is, as it constantly changes during play depending on what quest and stage you're on. Ideally I would like to use the quest marker on the map (the red or green triangle). If that's not possible maybe do something like (doesn't work):
set myquest to GetActiveQuestset mydistance to myquest.GetDistance Player

User avatar
Scott
 
Posts: 3385
Joined: Fri Nov 30, 2007 2:59 am

Post » Tue May 17, 2011 9:16 am

Its because 'myQuest' does not contain a 'reference' name.

Are you talking about vanilla quests? Not sure it possible unless you know what quest is active and what the quest target is, if there even is a target.
User avatar
Sebrina Johnstone
 
Posts: 3456
Joined: Sat Jun 24, 2006 12:58 pm

Post » Tue May 17, 2011 1:53 pm

GetActiveQuest will return the active quest, but not the target. However, the game does store the target location somehow, or else the console command MoveToQuestTarget wouldn't work and there is ofcourse the green/red marker on the map. I'm pretty sure I managed this some time ago, but for a fixed quest as GetActiveQuest didn't exist back then. Thanks for your response though.
User avatar
Big Homie
 
Posts: 3479
Joined: Sun Sep 16, 2007 3:31 pm


Return to IV - Oblivion