kaneydien Posted May 23, 2012 Share Posted May 23, 2012 As the topic reads, I am trying to make an NPC hostile to me during a quest. While writing the dialogue, I have two options, one of which I want to cause the NPC to break the conversation and attack the player. I tried putting in this: StartCombat(Game.GetPlayer()) I put it into the dialogue view under the END section (the same place you would progress the stages of a quest as a player talks to an NPC), but it comes back with an error saying that StartCombat is not a function or does not exist. Any help would be appreciated. Thanks. Link to comment Share on other sites More sharing options...
gasti89 Posted May 24, 2012 Share Posted May 24, 2012 StartCombat() is an ACTOR script, so it can't extend a dialogue (since the dialogues aren't inside actors, they are played by actors with conditions). So you have to specify who is starting the combat. To do this, you have to first define a property, so i think it's better to make the dialogue call a SetStage() and then put the StartCombat() on the newly created stage. So open properties, create, actor property and name it myNPC. Then fill the value with your NPC (you have to specify the cell where you put him in CK). Now, in the quest stage fragment put the script myNPC.StartCombat(Game.GetPlayer()) Quoting from CKwiki, it's recommended to not add properties or variables to dialogue fragments Do not have any properties or variables pointing at a topic info fragment script. For memory reasons, these do not stick around and may cause odd behavior if you try to hold onto them. Link to comment Share on other sites More sharing options...
Recommended Posts