Jump to content

Recommended Posts

Is it possible? Right now I'm trying to do:

local function StartDetectingPlayers_Handler(inst)    inst:AddComponent("playerprox")    inst.components.playerprox:SetDist(3, 4)    inst.components.playerprox:SetOnPlayerNear(greetplayer)    inst.components.playerprox:SetOnPlayerFar(goodbyeplayer)endlocal function OnDoneBuilding_Handler(inst)    if inst.components.talker then        inst.AnimState:PlayAnimation("talk", false)        inst:playtalksound()        inst.components.talker:Say("I'M ALIVE! ... kind of.")    end        inst:DoTaskInTime(10, inst:startdetectingplayers())    inst.AnimState:PushAnimation("idle", true)endlocal function onbuilt(inst)    inst.AnimState:PlayAnimation("place", false)    inst:DoTaskInTime(2, inst:ondonebuilding())end

But, right after my object is built it says right away the "I'm alive" part, skips the place animation and starts detecting players while playing the idle animation.

 

Any ideas how this can be done?

Link to comment
https://forums.kleientertainment.com/forums/topic/48291-nesting-dotaskintime/
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
×
  • Create New...