Jump to content

NPC's AI and Animation troubles oh my


Recommended Posts

So I'm at my wits end with this one. I had it working just fine for the most part and now the CS has decided to eat something and break part of my work. First a basic description: You buy an Inn, hire a crew, get the Inn prepared and it's reopened. When you re-open a musician and a dancer join the crew and start to perform during certain hours, no problem there. You can talk to the dancer and she'll offer you "a little company" where you'll eat dinner together, you talk to her and have a nice conversation with several possible outcomes depending on your delivery and responses, At the end, the dinner is over and she'll invite you upstairs. You go to the room, talk to her and she says have a seat and enjoy the show and puts on a little timed strip tease for you while dancing. when it's over she redresses, talks to you again and says she had a nice evening and hopes you enjoyed it and to see her again sometime, then leaves and returns to whatever else she normally does.

 

so the break down is this:

 

You talk to her and pay her, and CRDATE is set to 1 which is the condition for her to sit at the table and eat dinner, the dinner plates with static meal are enabled as well. You have a seat and initiate conversation with her (I'd love to have her start conversation if I could figure out how to conditionalize the player using a chair) does getdistance == 0 to the chair work? )

 

you go through the conversation choices which result in various responses, mostly just for flavor, but one track will add a conversation topic for use with the musician, then the dinner eands, the plates are swapped out with clean ones again (enable/disable) and the CRDATE is set to 2 which is the condition for her to walk to the room upstairs. She stands and heads up there.

 

when she reaches the room (basically as soon as she loads into the next cell) she reaches the mark which is the target for the AI pack, her script says to change to CRDATE 3 and to change clothes, which she also does just fine.

 

you arrive in the room and talk to her and her greeting for condition CRDATE 3 comes up and tell you to sit down and enjoy the show. The conversation topic sets CRDATE to 3 which her script then has a timer initialize that basically removes a clothing item every ten seconds. Her AI pack which qualifies for CRDATE 3 also points to the same arrival mark which she's on and her dance animation file (which is set at full body) is conditionalized to that current AI pack being active.

 

Previously she would stand there after the conversation and do nothing until the first timer mark hit at 15 seconds and she removed her gloves and then she'd begin the dance, so I tried adding another item (a ring) that would remove a few seconds into the timer but it didn't have the desired effect of triggering the pickidle like the gloves seemed to. she would dance, do her thing and all the timer states worked just fine and she finished her dance and the timer code would set CRDATE to 4 which qualifies her last AI pack of the date which is to find the player. Her greeting which qualifies under CRDATE 4 shows fine, she thanks you, gets dressed in the topic script and then the topic sets CRDATE to 0 and he returns to her normal schedule.

 

Now for some reason and with NO editing of anything relating to her, she is now no longer dancing unless you talk to her again after her greeting of "have a seat and enjoy the show" You talk to her again and the greeting for during the dance comes up "You like what you see?" and then she dances, but she dances the wrong direction! (she's placed on a heading mark to ensure the movement plays out ok and she doesn't walk through anything)

 

So my question is why would the pickidle not trigger quickly, and in the case now not at all? I have even used the console command to force the pickidle and previously it would work fine, not it does nothing until I talk again to her.

 

So when I figure out how to get it back to where it was before the CS decided to screw something up, How can I get her to immidiately evaluate her AI packages after the conversation? I;ve tried using the pickidle command in the scripts I've tried to use EVP and they don't seem to work.

Link to comment
Share on other sites

ok, so I tinkered a bit and now the animation ONLY plays when I use the console pickidle command. She chooses the right animation, so it's been evaluated, she just doesn't actually appear to idle. Her energy is at 100, does that play a part? I know it has something to do with determining idle animation frequency, but not sure how.

 

Another odd thing is that I had it working to exactly where it was before the CS boffed something up and she would dance when the gloves came off, but the animation file I had to update because the older version had a break in it and she would jump back to where she was suddenly at the end, and the new one actually looped, but now she would dance the opposite direction of the heading mark. So I rotated the heading mark, which is fine, but now she doesn't initiate the idle animation on her own at all. Her AI evaluates it and selects it but doesn't actually play it. And talking to her does not initiate it any longer, only the console command. any ideas?

 

scn CRDancerscript

float timer
float fQuestDelayTime

short dressup

Begin GameMode

if CRDate == 2 
if CRDancer2REF.getincell hearthcraftsinnRooms == 1
	if dressup == 0
		removeitem 00kyami1low3 1
		removeitem 00sexyrobeBH 1
		removeitem CRBlackBoots 1
		CRDancer2REF.additem 00Corsethand 1
		CRDancer2REF.additem 00corsetNWK 1
		CRDancer2REF.additem 00corsetfoot1 1
		CRDancer2REF.additem 00garterbelt1W 1
		CRDancer2REF.additem 00panties01W 1
		CRDancer2REF.additem JewelryRing1Brass1Pearl 1

		CRDancer2REF.equipitem 00Corsethand 1
		CRDancer2REF.equipitem 00corsetNWK 1
		CRDancer2REF.equipitem 00corsetfoot1 1
		CRDancer2REF.equipitem 00garterbelt1W 1
		CRDancer2REF.equipitem 00panties01W 1
		CRDancer2REF.equipitem JewelryRing1Brass1Pearl 1

		set dressup to 1
	endif
endif
endif

if CRDate == 3

    set fQuestDelayTime to 0.001

    if ( timer < 60 )
        set timer to timer + getSecondsPassed
    else     
	set CRDate to 4
endif
   
   if timer >= 2 && timer < 20
	removeitem JewelryRing1Brass1Pearl 1
   elseif timer >= 20 && timer < 30
	removeitem 00corsethand 1
elseif timer >= 30 && timer < 40
	removeitem 00corsetNWK 1
elseif timer >= 40 && timer < 50
	removeitem 00corsetfoot1 1
	removeitem 00garterbelt1W 1
elseif timer >= 50 && timer < 60
	removeitem 00panties01W 1
    endif
endif

end


Link to comment
Share on other sites

I'm certainly no scripter, but when you say you rotated the heading marker to fix problem 'A' I'm wondering if her attention focus is now facing the wrong direction so that she doesn't 'see' that the player is there?
Link to comment
Share on other sites

I don't think so because getdistance checks aren't dependent on the NPC having sight of the player.

 

I did figure it out actually. I just have her run a package evaluation to get her back to the heading she needs to be on and then run the pickidle command which initiates the animation instantly after arriving there, so it works perfectly now. The dance animation loop even ends at her start pointy at the end of the timer, which I wasn't sure if it was going to or not. So yay! I'm happy for now until the CS decides to loose something else like it always is... uhhhgg

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...