Jump to content

End Dialogue Script and Cooldown


GornoDD

Recommended Posts

Posted

Hi

 

I have two more issues with my mod that I cant really find proper functions to solve them.

 

1.) First problem is that I have a scene that is started by a dialogue choice. But it only starts after I "Tab" out of the dialogue. Is there a function to quit the dialogue to start the scene already?

 

2.) Second one is, that I want the dialogue to go on some kind of cooldown, so that its not available all the time (its a prostituion option, so it makes sense that npcs dont wanna have sex all the time). The internal option in the creation kit sets the dialogue topic on cooldown for all npcs, but I just want this for the last one it was actually selected. I have tryed to make it "arrousal" dependant and set the dialogue on a condition but this isnt really working all that well.

Posted

Hi.

 

To start the scene or the package in a dialogue, probably you wrote some code in the TopicInfo Fragment.

There are two sections of the fragment. Begin and End.

You can put your code in the Begin area (but have a short response or it will look bad.)

Flag the Topic Info as "Goodbye" so there will be no more possible interactions.

 

About the "Cool down".

For sure you have a Quest (for the dialogues), and probably you added a script inside the quest.

Define the script as conditional

 

Scriptname thisismyquestscript extends Quest Conditional

 

and then add a conditional property inside

 

Int Property myCoolDown Auto Conditional

 

 

Then to start the waiting just use a function like

 

Function letsCoolDown(float numOfSecs)

  myCoolDown = 1

  Utility.wait(numOfSecs)

  myCoolDown = 0

EndFunction

 

And then, put a condition inside your Topic like this:

 

GetVMQuestVariable <nema of your quest>/<myCoolDown> != 1

 

 

That should do the trick.

Of course you have to call the function, let's say directly in your dialogue, or at the end of the scene.

 

thisismyquestscript Property myController Auto

 

...

myController.letsCoolDown(30.0)

...

 

 

Posted

Try this. Compile, and then post the errors.

I cannot test it right now.

 

 

Scriptname FM_MainquestScr extends Quest Conditional
 
Int Property myCoolDown Auto Conditional
 
Function letsCoolDown(float numOfSecs)
  myCoolDown = 1
  Utility.wait(numOfSecs)
  myCoolDown = 0
EndFunction
 
The idea is:

* The quest is defined as Conditional, so you can use Conditional Properties

* One Integer Property is defined as conditional, so you can use it inside the conditions of the dialogues (and all other conditions)

* The function will set the value of this property to 1, then wait the number of seconds you pass as argument, and then puts the property back to 0.

Posted

Try this. Compile, and then post the errors.

I cannot test it right now.

 

 

Scriptname FM_MainquestScr extends Quest Conditional
 
Int Property myCoolDown Auto Conditional
 
Function letsCoolDown(float numOfSecs)
  myCoolDown = 1
  Utility.wait(numOfSecs)
  myCoolDown = 0
EndFunction
 
The idea is:

* The quest is defined as Conditional, so you can use Conditional Properties

* One Integer Property is defined as conditional, so you can use it inside the conditions of the dialogues (and all other conditions)

* The function will set the value of this property to 1, then wait the number of seconds you pass as argument, and then puts the property back to 0.

 

 

I deleted my post already, but you where faster. After reading the code a third time it came to me :D

 

I did everythin you said but.... are these really seconds? After I asked a character the topic and waited for several hours ingame the topic was still unavailable. I used

 

myController.letsCoolDown(3600.0)

 

Also It doesnt work for Individual characters. It seems to go on cooldown for every NPC at the same time.

Posted

Yes, the cool down written in this way is global for the dialogue.

 

Tell me more about the dialogue(s) you are doing, maybe I can do something better.

For example, you can use a Faction to list the NPCs that had sex, and then the cool down will work in a different way:

Will add the NPC to the faction, and then set up a wait time for each one.

Not really complex to do.

 

Then the dialogue condition can just check if the speaker is in the faction or not.

Posted

Yes, the cool down written in this way is global for the dialogue.

 

Tell me more about the dialogue(s) you are doing, maybe I can do something better.

For example, you can use a Faction to list the NPCs that had sex, and then the cool down will work in a different way:

Will add the NPC to the faction, and then set up a wait time for each one.

Not really complex to do.

 

Then the dialogue condition can just check if the speaker is in the faction or not.

 

Its basically a prostituion option with a leading topic "hey, you want to have some fun" wich branches into options like "whipping", "blowjob" etc....

 

I assined the condition to the leading question(topic) "hey, you want to have some fun".

 

I could add a script to this leading topic that adds the npc actor to a "HadSexFaction" via "AddToFaction". Then add a condition wich excludes NPCs that belong to that faction from beeing able to be asked that topic (!=HadSexFaction). 

 

But I dont understand how I could get them to leave that faction after a set amount of time.

Posted

 

 

 

Its basically a prostituion option with a leading topic "hey, you want to have some fun" wich branches into options like "whipping", "blowjob" etc....

 

I assined the condition to the leading question(topic) "hey, you want to have some fun".

 

I could add a script to this leading topic that adds the npc actor to a "HadSexFaction" via "AddToFaction". Then add a condition wich excludes NPCs that belong to that faction from beeing able to be asked that topic (!=HadSexFaction). 

 

But I dont understand how I could get them to leave that faction after a set amount of time.

 

 

Cool.

 

I can write a function for you (actually 2 functions and one event) to manage this.

I will write some pseudo-code, then you have to adapt a little to your mod (mainly by putting the correct names for the faction.)

Posted

 

 

 

 

Its basically a prostituion option with a leading topic "hey, you want to have some fun" wich branches into options like "whipping", "blowjob" etc....

 

I assined the condition to the leading question(topic) "hey, you want to have some fun".

 

I could add a script to this leading topic that adds the npc actor to a "HadSexFaction" via "AddToFaction". Then add a condition wich excludes NPCs that belong to that faction from beeing able to be asked that topic (!=HadSexFaction). 

 

But I dont understand how I could get them to leave that faction after a set amount of time.

 

 

Cool.

 

I can write a function for you (actually 2 functions and one event) to manage this.

I will write some pseudo-code, then you have to adapt a little to your mod (mainly by putting the correct names for the faction.)

 

 

Id highly appretiate that. The mod is aimed to give the player the full "beeing a prostitute" experience. I have added perks that interegrate viable options of income by allowing you to have more and more extreme sexual interaction with your customers and granting you passive bonuses to aid you in your adventures. Like unlocking the wipping option makes you 10% more resistant to damage etc. I try to keep it somewhat balanced and immersive.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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