Jump to content

Trying to Understand the Timer function in the GECK plus quest stuff


jet100a

Recommended Posts

Hello all, I am very unfamiliar with the GECK and have been trying to understand how to use the timer function. To get an understanding of how it works I am trying to create a timer which rewards the player 4xp every in game day or every 1 real life hour. Heres what I have written (go easy on me, I have no idea what I am doing)

 

------------------------------------------------------------------------------------------------------------

float timer
begin gamemode
if timer < 3600
set timer to timer + GetSecondsPassed
else
;60 seconds have passed, do something special
player.rewardxp 4
set timer to 0
endif
end
-------------------------------------------------------------------------------------------------------------
Basically I want this to repeat every real life hour or in game day. I was thinking it could be useful in a hoard mode mod or something else. Most of this script comes from the GECK website http://geck.bethsoft.com/index.php?title=GetSecondsPassed
I wrote this script in the quest section under its own quest id, basically its a quest stage that's supposed to repeat forever but I could make it an actual script effect but I have even less experience with that. I tried forcing the quest using console commands in game but I think I wrote the script wrong and its in the wrong place. Any help would be appreciated.
Thanks for reading!
--------------------------------------------------------------------------------------------------------------
EDIT:
So I tried making it a script but I can't seem to get it to compile
Edited by jet100a
Link to comment
Share on other sites

It won't compile because it is "RewardXP 4", not "player.RewardXP 4". It only works on the player.

 

The rest should work in a quest script. You need to create a new script, set it as a quest type, and give it a name:

scn MyQuestScript  <- Usually the name of your quest + "Script" at the end
 
float timer

begin gamemode
   if timer < 3600
      set timer to timer + GetSecondsPassed
   else
      ;60 seconds have passed, do something special
      rewardxp 4
      set timer to 0
   endif
end
Edited by GamerRick
Link to comment
Share on other sites

 

It won't compile because it is "RewardXP 4", not "player.RewardXP 4". It only works on the player.

 

The rest should work in a quest script. You need to create a new script, set it as a quest type, and give it a name:

scn MyQuestScript  <- Usually the name of your quest + "Script" at the end
 
float timer

begin gamemode
   if timer < 3600
      set timer to timer + GetSecondsPassed
   else
      ;60 seconds have passed, do something special
      rewardxp 4
      set timer to 0
   endif
end

Thank you so much! I got it to work thanks to your help! I really had no idea what I was doing lol.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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