Jump to content

Recommended Posts

You need to find it's prefab name, for a spider it's "spider".

Quote

When you want it to listen to you, there is a problem, because you summon default spider from game which is a monster and will attack you.

In the tutorial, there is item called anchor

Quote

local function bookonread(inst, reader)
            
    if ReqChakra(reader) then
         local creature = SpawnPrefab("creature")         
         creature.Transform:SetPosition(inst.Transform:GetWorldPosition())
         creature.components.follower:SetLeader(reader)    
        
         local puff = SpawnPrefab("collapse_small")
         puff.Transform:SetPosition(inst.Transform:GetWorldPosition())    
        
            reader.components.sanity:DoDelta(-45)
            reader.components.health:DoDelta(-15)
            
       else    
    inst.components.talker:Say("I have to rest...", 0.1,true)
    end
end

Change prefab "creature" into "spider".

Or anything you like.

 

But in order to create your own spider that listens to you, you need to modify something in the tutorial.

For example spider's lua inside prefab folder, so it looks like a spider...

Quote

        inst.AnimState:SetBank("wilson")
        inst.AnimState:SetBuild("creature")
        inst.AnimState:PlayAnimation("idle")

...change bank and build to "spider"

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...