antstubell Posted November 18, 2012 Share Posted November 18, 2012 Hi all.I have a quest where player steals a teddy from a girl's end table to give to another girl (long story). The teddy is given to the girl (who wanted it), Side Quest Completed. SetStage 40.Now girl #1 (who had her teddy robbed) @ Stage 40 goes into a strop and starts an AI package of Sit, crosslegged and crying in the middle of the town. Dialouge so far is that she suspects player had something to do with it (no proof), threatens to call the guards and wants a new teddy. She ain't budging until she gets a new teddy and 50 gold (kids are expensive these days). Still SetStage 40, ObjectiveDisplayed "Get a Teddy..blah. blah".The next dialouge needs to check if player already has a teddy, how do i do this and move it to the next stage of player having a teddy in inventory?Thanks. Link to comment Share on other sites More sharing options...
KingsGambit Posted November 18, 2012 Share Posted November 18, 2012 A script that checks for the item with the GetItemCount function, along the lines of: if (Game.GetPlayer().GetItemCount(MyTeddy >= 1)) Debug.Trace("Player has my teddy!")else Debug.Trace("Player does not have my teddy.")endIf Link to comment Share on other sites More sharing options...
antstubell Posted November 21, 2012 Author Share Posted November 21, 2012 (edited) I tried the script using the Alias "Alias_TBear" and got error Cannot compare an Alias to an IntSetup a MISC property TBear and got the error Cannot compare a misc object to an Int. Here's the script I'm using at Stage 10 if (Game.GetPlayer().GetItemCount(TBear >= 1)) Debug.Trace("Player has my teddy!")SetStage(30) else Debug.Trace("Player does not have my teddy.")SetStage(11) endIf What do I do? Edited November 21, 2012 by antstubell Link to comment Share on other sites More sharing options...
kryptopyr Posted November 21, 2012 Share Posted November 21, 2012 Maybe I'm misunderstanding, but it sounds like you want a certain dialogue option to be appear when the player has a teddy bear in their inventory. If so, you should be able to do this by setting a condition on the topic info itself. The condition would be set up something like... Target (Player), GetItemCount, TeddyBear >= 1 You could then attach the SetStage script to the info as well, so that once the player says this line it will advance the quest to the next stage. You can also have the script remove the teddy from the player and give it to the girl (if that's what you want to do). Link to comment Share on other sites More sharing options...
Recommended Posts