Jump to content

Recommended Posts

Being straightforward, i'm trying to always spawn a Varg when a hunt is completed.

 

The command lines i tried are:

Quote

local hunt_varg = inst.components.hunter.self:OnDirtInvestigated    -- Varg hunt test.
    inst.components.hunter.self:OnDirtInvestigated = function (self, inst, pt, doer)
    if hunt.trackspawned == hunt.numtrackstospawn then
                    SpawnPrefab("warg")
                    hunt.activeplayer:PushEvent("huntbeastnearby")
                    StopHunt(hunt)
                else
                    --print("SpawnHuntedBeast FAILED! RESETTING")
                    ResetHunt(hunt)
                end
    return hunt_varg (self, inst, pt, doer)
    end

 

 

And the error is:

Quote

[string "scripts/mainfunctions.lua"]:90: Error loading file prefabs/yukihime
[string "../mods/Yukihime - Art/scripts/prefabs/yukihime.lua"]:112: function arguments expected near 'inst'
LUA ERROR stack traceback:
        =[C] in function 'assert'
        scripts/mainfunctions.lua(90,1)
        =(tail call) ?
        =[C] in function 'xpcall'
        scripts/mods.lua(131,1)
        scripts/mods.lua(570,1) in function 'RegisterPrefabs'
        scripts/gamelogic.lua(216,1) in function 'LoadAssets'
        scripts/gamelogic.lua(802,1)
        =[C] in function 'SetPersistentString'
        scripts/saveindex.lua(176,1) in function 'Save'
        scripts/saveindex.lua(362,1)
        =[C] in function 'SerializeWorldSession'
        scripts/networking.lua(275,1) in function 'SerializeWorldSession'
        scripts/saveindex.lua(365,1) in function 'OnGenerateNewWorld'
        scripts/gamelogic.lua(813,1) in function 'cb'
        scripts/screens/worldgenscreen.lua(144,1) in function 'OnUpdate'
        scripts/frontend.lua(587,1) in function 'Update'
        scripts/update.lua(94,1)    
[00:01:51]: Disabling Yukihime - Art (Yukihime) because it had an error.

 

Any ideas? Any help is appreciated.

Also, uploaded the file if anyone wants to take a deeper look.

I'm pretty desperate to make it work. Everything i've tried is failing.

 

 

yukihime.lua

Edited by diovbc
Retried everything with different code. Updated the post.

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