Need some help fixing my quest's scripts!

Post » Wed Nov 10, 2010 1:47 pm

Hey guys, I'm making a quest at the moment, and what I'm trying to do, is have an NPC who meets the player in a crowded tavern, and then leads him/her over to somewhere more private where he can give the player the quest without the "bad guys" hearing about it. There's some animations involved, and I can't get them to play.

To be more presise, I'm trying to get the NPC to move to a spot, and play the "follow me" animation until the player gets close enough, before sitting down at a table in a deserted corner of the tavern, at which point his quest becomes available.

I'm doing this through a script attached to the NPC:

scn danOffalScript

begin gamemode

if getstage danGobboQuest == 5
if danOffalREF.Getdistance danOffalBeckonMarker == 0
danOffalREF.additem danAnimationAmulet 1
setstage danGobboQuest 6
endif
elseif getstage danGobboQuest== 6
if player.Getdistance danOffalREF <= 128
setstage danGobboQuest 7
endif
endif

end


(BTW, Dan's my name, so I'm using it as a prefix for everything in my mod, to hopefully eliminate incompatibility, and "Offal" is the name of the NPC, who happens to be a necromancer).

If the quest is at stage 5, Offal the necromancer moves to his position (danOffalBeckonMarker), and recieves an (unplayable and invisible) amulet, that is required to play the "follow me" animation (the exact conditions for the animation can be seen http://i101.photobucket.com/albums/m43/danburite/animationconditions.jpg). At this point, the quest is moved to stage 6, which is mostly just there to determine if the player is close enough to the NPC. One the player is close enough, the quest is supposed to move to stage 7, where the NPC sits down, and offers the quest.

At least, that's what's supposed to happen. Currently, my NPC moves to the spot as intended, but doesn't play his animation, and doesn't sit down once the player gets close enough.

Oh, and the conditions for the various AI packages are:
danOffalBeckonPackage (for beckoning to the player): Must Reach Location, Must Complete, Skip Fallout Behaviour, target: no, getstage danGobboQuest == 5 OR 6
danOffalSitPackage (for sitting at the table): Must Reach Location, Must Complete, Once Per Day, target: no, getstage danGobboQuest == 7

So... any ideas on how to fix it? :)
User avatar
Georgine Lee
 
Posts: 3353
Joined: Wed Oct 04, 2006 11:50 am

Post » Wed Nov 10, 2010 10:12 pm

You forgot a "PickIdle" command after you added the amulet.

I also recommend to change the GetDistance condition in the Idle Manager from " == 0" to " <= 150". GetDistance is very precise, and it's almost impossible an actor moves to the exact exact exact same spot. Then see if it works, and if it does, try a lower value to see if that works, until you get about the lowest value possible.
User avatar
Caroline flitcroft
 
Posts: 3412
Joined: Sat Nov 25, 2006 7:05 am

Post » Wed Nov 10, 2010 4:24 pm

You forgot a "PickIdle" command after you added the amulet.

I also recommend to change the GetDistance condition in the Idle Manager from " == 0" to " <= 150". GetDistance is very precise, and it's almost impossible an actor moves to the exact exact exact same spot. Then see if it works, and if it does, try a lower value to see if that works, until you get about the lowest value possible.


Thanks, I tried both things, but I'm still experiencing the same problem, which svcks.

Still, I can't believe I never noticed I didn't have a pickidle! :D
User avatar
James Rhead
 
Posts: 3474
Joined: Sat Jul 14, 2007 7:32 am

Post » Wed Nov 10, 2010 10:25 am

Bump!

Anyone have any idea what the problem could be?
User avatar
Lexy Dick
 
Posts: 3459
Joined: Mon Feb 12, 2007 12:15 pm


Return to IV - Oblivion