Jump to content

Can't find code to start deerclops arraival.


Bleksmits

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.

 

 

 

 

 

 

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

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:

 

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...