Jump to content

Search the Community

Showing results for tags 'timer'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Hot Lava
    • [Hot Lava] - General Discussion
    • [Hot Lava] - Suggestions and Feedback
    • [Hot Lava] - Bug Tracker
    • [Hot Lava] - Strats and Records
    • [Hot Lava] - Developer Log
    • Hot Lava Latest Update
  • Griftlands
    • [Griftlands] - General Discussion
    • [Griftlands] - Suggestions and Feedback
    • [Griftlands] - Mods and Tools
    • [Griftlands] - Localization
    • [Griftlands] - Bug Tracker
    • [Griftlands] - Developer log
  • Oxygen Not Included
    • Oxygen Not Included FAQ
    • [Oxygen Not Included] - Developer log
    • [Oxygen Not Included] - General Discussion
    • [Oxygen Not Included] - Bug Tracker
    • [Oxygen Not Included: Spaced Out!] - Bug Tracker
    • [Oxygen Not Included] - Mods and Tools
    • [Oxygen Not Included] - Suggestions and Feedback
    • [Oxygen Not Included] Art, Music & Lore
    • Community Challenges
    • [Oxygen Not Included] - Latest Content Update
    • [Oxygen Not Included] - Latest Animated Short
    • Oxygen Not Included DLC Alpha
  • Don't Starve Together
    • Don't Starve Together FAQ
    • [Don't Starve Together] Developer log
    • [Don't Starve Together] General Discussion
    • [Don't Starve Together] Beta Branch
    • [Don't Starve Together] PlayStation
    • [Don't Starve Together] Xbox One
    • [Don't Starve Together] Nintendo Switch
    • [Don't Starve Together] Bug Tracker
    • [Don't Starve Together] Trading
    • [Don't Starve Together] Server Bulletin
    • [Don't Starve Together] Dedicated Server Discussion
    • [Don't Starve Together] Mods and Tools
    • [Don't Starve Together] Tales of Life and Death
    • [DS + DST] Art, Music and Lore
    • [Don't Starve Together] Suggestions and Feedback
    • [Don't Starve Together] The Forge
    • [Don't Starve Together] The Gorge
    • [Archived Bugs]
  • Don't Starve
    • Don't Starve FAQ
    • [Don't Starve: Pocket Edition] iOS / Android
    • [Don't Starve] General Discussion
    • [Don't Starve] Mods and tools
    • [Don't Starve] Art, Music & Lore
    • [Don't Starve] Suggestions and Feedback
    • [Don't Starve] Videos
    • [Don't Starve] Bug Tracker
    • [Don't Starve] Trading
    • [Don't Starve] Testing Discussion (archive)
  • Klei Entertainment Games
    • Eets Munchies
    • [Invisible, Inc.] General Discussion and Strategies
    • Mark of the Ninja
    • Shank
  • Other Stuff
    • Other Klei Services

Categories

  • Don't Starve
    • Custom Characters
    • Game Modifications
    • Language Packs
    • Modding Tools, Tutorials & Examples
    • Custom Maps

Categories

  • Oxygen Not Included
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Don't Starve
  • Don't Starve Together
  • Don't Starve Together: Beta Branch
  • [Don't Starve Together] Nintendo Switch
  • [Don't Starve Together] PlayStation
  • Don't Starve Together: Return of Them
  • Don't Starve Together: The Gorge
  • Don't Starve Together: The Forge
  • Don't Starve Together: The Forge (Archive)
  • [Don't Starve Together] Xbox One
  • Don't Starve: Shipwrecked [archive]
  • [Don't Starve Together] PS4 (archive)
  • [iOS] Don't Starve: Shipwrecked
  • Don't Starve: Hamlet [ARCHIVE]
  • Don't Starve: Shipwrecked [ARCHIVE]
  • Don't Starve: Hamlet Early Access [archive]
  • Don't Starve: Hamlet Closed Beta (ARCHIVE)

Categories

  • Oxygen Not Included
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Hot Lava
  • Don't Starve Together
  • [Nintendo Switch] Don't Starve Together
  • [PlayStation] Don't Starve Together
  • [Xbox One] Don't Starve Together
  • Don't Starve
  • Don't Starve: Shipwrecked

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Biography


Location


Interests


Occupation


Favorite Game


Modder


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Klei Featured Artist


Early Supporter


Early Supporter


Don't Starve


Don't Starve Together


Oxygen Not Included

Found 5 results

  1. So I'm making a character who dies every 22 minutes, called the Hatchling. I have a functional script that will instantly kill the Hatchling after a 22 minute timer... but I wanted a warning system. My plan was that after 20 minutes, (2 minutes before death) a song will start playing. I made a timer script, based on the same timer for the Kill Loop. Here's the scripts I have. If someone can help me, please do! I labelled them with comments, and even put in print() functions, but the print("EndSong plays") appears in the console before the Hatchling even loads in. --Kills the Hatchling after a certain time. At release, it should be 22 minutes. AddPrefabPostInit("hatchling", function(inst) print("AddPrefabPostInit") if not inst.components.timer then inst:AddComponent("timer") end inst.components.timer:StartTimer("when the sun explodes",60*3) --should be "when the sun explodes",60*22) print("Timer start") local function YouGetKilled(inst) if inst.components.health and not inst.components.health:IsDead() then inst.components.health:Kill() print("running YouGetKilled") end end inst:ListenForEvent("timerdone", YouGetKilled) -- revive yourself here -- assume you have a home if inst.components.homeseeker then inst.Transform:SetPosition(inst.components.homeseeker:GetHomePos()) print("Going Home") end -- revive inst:PushEvent("ms_respawnedfromghost") print("respawning") inst:ListenForEvent("ms_respawnedfromghost", function() if inst.components.timer:TimerExists("when the sun explodes") then inst.components.timer:StopTimer("when the sun explodes") print("stopping timer") end inst.components.timer:StartTimer("when the sun explodes",60*3) --should be "when the sun explodes",60*22) print("restarting timer") end) end) --This script should play The End Times when there's 2 minutes left in the Loop AddPrefabPostInit("hatchling", function(inst) print("AddPrefabPostInit") if not inst.components.timer then inst:AddComponent("timer") end inst.components.timer:StartTimer("EndSong",60) --should be "EndSong",60*20) print("EndSong Timer start") inst:ListenForEvent("timerdone") inst.SoundEmitter:PlaySound("sound/customvoice") --adding this causes the game to crash upon loading the Hatchling. It doesn't give me anything useful, though. print("playing song") inst:ListenForEvent("ms_respawnedfromghost", function() if inst.components.timer:TimerExists("EndSong") then inst.components.timer:StopTimer("EndSong") print("stopping EndSong timer") end inst.components.timer:StartTimer("EndSong",60) --should be "when the sun explodes",60*22) print("restarting EndSong timer") end) end) As a note: CustomVoice is the name of the .fev and .fsb files I'm using for the song. I'll be renaming it once I get everything working properly.
  2. I'm making a character whose main gimmick is that they die every 22 minutes, then can be revived with no Max HP cost. How would I keep their Max HP from going down? Would I put some script into their lua, or would I need to put it in a new revival item unique to them? (My original plan was to add a new revival item for them to use anyway, so that won't be a problem.)
  3. i wanted to add an Aura to Butterflies that gives me Sanity standing close to them and losing it when i'm far from them; i did both parts, but the problem is that i wanted to add a timer where, if i'm far from any butterflies, first i don't lose any Sanity, then i start losing it after 5 seconds, like i have a countdown to get close to one This is my code, but it doesn't work, Delta remains 0 even after few seconds, it's like the NightmareMode function doesn't even start Any ideas?
  4. I was looking at a meteor shower then thought that I might be able to use that to make a sort of "PK Starstorm" like attack (Brawl version, not the unavoidable, almost polar opposite, actual version :P) So; would I be able to just add a new component and remove the rock spawning, then add a custom projectile using local projectile = SpawnPrefab("star") or am I missing something? Just asking so I don't spend 5 hours or something doing the wrong thing Thanks for you help, ProtoStar.
  5. Case 1: local prefab = "evergreen" --could be anything elselocal interval = 1 --secAddPrefabPostInit(prefab,function(inst) inst:DoPeriodicTask(interval,function(inst) --Do some staff with high CPU load end)end)​ And case 2: local prefab = "evergreen" --could be anything elselocal interval = 1 --secAddPrefabPostInit(prefab,function(inst) inst:AddTag("some_tag")end)AddPrefabPostInit("forest",function(inst) inst:DoPeriodicTask(interval,function(inst) local ents = GLOBAL.TheSim:FindEntities(0,0,0,1200,{"some_tag"}) for i,v in ipairs(ents) do --Do some staff with high CPU load end end)end)​What is better?
×
×
  • Create New...