Jump to content

Really quick DoTaskInTime question


Recommended Posts

So I'm trying to make a book for a mod and I want the reader to say two things if they aren't tagged as a specific term.

local function onread(inst, reader)
      if  reader:HasTag("bookworm") then
	reader.components.talker:Say(GetString(reader, "ANNOUNCE_BOOKREAD"))
	else
	reader.components.talker:Say(GetString(reader, "ANNOUNCE_LOWRESEARCH"))
	reader.components.sanity:DoDelta(-20)
	inst:DoTaskInTime(10, reader.components.talker:Say(GetString(reader, "ANNOUNCE_LOWSANITY")))
        end
  return true
end

However, it hops right to the ANNOUNCE_LOWSANITY string. Any ideas?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...