Jump to content

Recommended Posts

Hi! I still working with deerclops little brother mod.

Now i want find deerclops arrival script make him show up, or spawn after characters special flute is played.

 

post-343123-0-13649200-1410096693_thumb.

 

With bigfoot it was easy.

Tried to change bigfoot's push script, of course nothing:D

 

post-343123-0-91335800-1410096389_thumb.

 

 

 

 

 

 

Edited by Bleksmits

First off, I'll say I have no idea if any of my advice is useful, since I am mostly guessing.

 

I would say that the 'bigfooter' is used specifically to summon bigfoot, so it probably won't work.

 

I believe the simple SpawnPrefab function in the mainfunctions.lua  should work

Maybe something more of

 

local function OnPlayed(inst, musician)

    global function SpawnPrefab(deerclops)

end

=-=-

I have no idea if this will work, I'm just guessing

 

Also maybe try looking at the spawner and childspawner components, or even minionspawner

 

=-=-=-

You also might want to include some sort of statement that prevents summoning a deerclops.if another exists

 

 

First off, I'll say I have no idea if any of my advice is useful, since I am mostly guessing.

 

I would say that the 'bigfooter' is used specifically to summon bigfoot, so it probably won't work.

 

I believe the simple SpawnPrefab function in the mainfunctions.lua  should work

Maybe something more of

 

local function OnPlayed(inst, musician)

    global function SpawnPrefab(deerclops)

end

=-=-

I have no idea if this will work, I'm just guessing

 

Also maybe try looking at the spawner and childspawner components, or even minionspawner

 

=-=-=-

You also might want to include some sort of statement that prevents summoning a deerclops.if another exists

 

Thank you! But!:)

 

 

 

local function  OnPlayed (inst, musician)

gloablfuncion SpawnPrefab(deerclops)   -- or "deerclops" 

end

 

 

 

game freezes. But its okay tanks anyway! :joyous:

 

then.

 

From creature mod tutorial modmain.lua added in my mod modmain.lua replaced "tut03" with "deerclops"

 

 

 

function SpawnCreature(player)

    

    --Get the player's current position.

    local x, y, z = player.Transform:GetWorldPosition()

    --[NEW] Spawn our new creature at the world origin.

    local creature = GLOBAL.SpawnPrefab("tut03")

    --Move the creature to the player's position.

    creature.Transform:SetPosition( x, y, z )    

end

--Tell the engine to run the function "SpawnCreature" as soon as the player spawns in the world.

AddSimPostInit(SpawnCreature)

 

 

 

it worked.

then putted in "my item flute" or rags.lua = error!

And then i tried something extra suspicious:D

in rags.lua

 

local function OnPlayed(inst, musician)

function SpawnCreature(player)

    

    --Get the player's current position.

    local x, y, z = player.Transform:GetWorldPosition()

    --[NEW] Spawn our new creature at the world origin.

    local creature = GLOBAL.SpawnPrefab("deerclops")

    --Move the creature to the player's position.

    creature.Transform:SetPosition( x, y, z )    

end

end

 

 

 

game ran great while not used flute "rags"

undeclared  variable spawn creature lua error stack traceback

 

 

 

I will continue my experiments:)

 

And sorry about my language i am not proper writer in my local language too. :spidercowers:

 

So i find basehassler.lua and i think this is what i need ant tried:

local function HearRags(inst, musician, instrument)	if GetWorld().components.basehassler then		GetWorld().components.basehassler:SummonDeerclops(musician:GetPosition())	endend

and this:

local function HearRags(inst, musician, instrument)	if GetWorld().components.basehassler then		GetWorld().components.basehassler:SummonDeerclops()	endend

and many other variations and got error:

"SummonDeerclops" (a nil value)

 after my instrument is played.

Please Help!

I have no another idea how to make deercloops show up. :indecisiveness:

So i find basehassler.lua and i think this is what i need ant tried:

and this:

and many other variations and got error:

"SummonDeerclops" (a nil value)

 after my instrument is played.

 

I have no another idea how to make deercloops show up. :indecisiveness:

 

In my (non-RoG) files it's called ReleaseHassler and not SummonDeerclops...

Also, I found in the code that you can set the hassler to deerclops at all times, but you should probably set it back to the seasonal giant for RoG

Success! :joyous:

local function OnPlayed(inst, musician)SpawnPrefab("deerclops").Transform:SetPosition(inst.Transform:GetWorldPosition())end

i took script from pighouse.lua

 

and now i need prevent another deerclops spawning if one already exist.

i think it not bee so hard to find it. Maybe ,just maybe...

Thanks for helping! :joyous:

 

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