Jump to content

How do I make something happen after a certain ammount of time has pas


SirIdiot

Recommended Posts

So, there's a quest I'm making. In the quest, you have to take this woman who was raped to a place. Once you're there, you gotta talk to this person. This person says he'll help her. Then, they both move to a certain marker with a fade. How do I make it so that after a certain amount of time has passed, she'll travel to a different marker I set up with a fade?

Edited by SirIdiot
Link to comment
Share on other sites

use GameDaysPassed in a quest script to mark a start time and after it's increased by however much time you want to pass set a flag that will trigger your updated behaviour.

i.e.

float fStartTrigger

begin gameMode

    if (GameDaysPassed >= (fStartTrigger + 3)
        Do NewStuff
    endIf

end

Edit: You'll want to put the setting of fStartTrigger in your dialogue or activator blocks. Set it to GameDaysPassed then.

 

Edit 2: GOD DAMN the new forum interface.

Edited by Xaranth
Link to comment
Share on other sites

So... (I have a sandbox package that runs when a quest variable is bCuring) If I wanted it to be 3 days until she move to the marker it would be...

(I have a sandbox package that runs on the quest variable bCured == 1)

 

 

 

float fStartTrigger

begin gameMode

    if (GameDaysPassed >= (fStartTrigger + 3)
       if (AbbiQuest1.bCuring == 1)
        Do MoveToMarkerWithFade AbbiCampMarker
         Set bCuring to 0
         Set bCured to 1
    endIf
  endif
end
 

?

Edited by SirIdiot
Link to comment
Share on other sites

Start by setting the NPC's dialogue result script to set the fCuringStartTime to GameDaysPassed (set AbbiQuest1.fCuringStartTime to GameDaysPassed), and start the quest if it's not running.

 

scn AbbiQuest1SCRIPT

float fCuringStartTime

Short bHelping
Short bCuring ; Checks if Samual and Abbi have moved to Samual's place
Short bCured
Short bDoOnce

Begin GameMode

	if (bDoOnce != 1)
		Set bHelping to 0
		Set bCuring to 0
		Set bCured to 0
		Set bDoOnce to 1
	endif

	if (bCuring)
		if (GameDaysPassed >= (fCuringStartTime + 3))
			set bCuring to 0
			set bCured to 1
		endIf
	endIf

	if (bCured)
		Do CrapThatNeedsDoingToUpdatePackages
		Do MoveTOMarkerCrap
		set bCured to 0
		stopQuest AbbiQuest1
	endIf

end

 

Edit: I HATE THE NEW FORUMS.

Edit 2: It helps to get the conditions right.

Edit 3: Third time's a charm for that damn condition, I need more coffee. ALSO WHY DOES THE EDITOR EAT MY LINE BREAKS!?

Edited by Xaranth
Link to comment
Share on other sites

Those 'Do' lines are pseudocode, not intended to be actually compiled. :pinch:

 

Replace them with the package changes and movetos and such that you want done, i.e. AbbiRef.MoveToMarkerWithFade AbbiHealedMarker or w/e

Link to comment
Share on other sites

Divide the number of hours by 24. EG: 6 hours: 6/24 == 0.25

 

So instead of if (GameDaysPassed >= (fCuringStartTime + 3) you'd use if (GameDaysPassed >= (fCuringStartTime + 0.25)

Edited by Xaranth
Link to comment
Share on other sites

  • Recently Browsing   0 members

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