Bleksmits Posted September 7, 2014 Share Posted September 7, 2014 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. With bigfoot it was easy.Tried to change bigfoot's push script, of course nothing:D Link to comment Share on other sites More sharing options...
MidrealmDM Posted September 12, 2014 Share Posted September 12, 2014 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 workMaybe 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 More sharing options...
Bleksmits Posted September 14, 2014 Author Share Posted September 14, 2014 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 workMaybe 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! 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:Din 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 ) endend 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. Link to comment Share on other sites More sharing options...
Bleksmits Posted September 17, 2014 Author Share Posted September 17, 2014 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()) endendand this:local function HearRags(inst, musician, instrument) if GetWorld().components.basehassler then GetWorld().components.basehassler:SummonDeerclops() endendand 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. Link to comment Share on other sites More sharing options...
Mobbstar Posted September 17, 2014 Share Posted September 17, 2014 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. 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 More sharing options...
Bleksmits Posted September 19, 2014 Author Share Posted September 19, 2014 Success! local function OnPlayed(inst, musician)SpawnPrefab("deerclops").Transform:SetPosition(inst.Transform:GetWorldPosition())endi 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! Link to comment Share on other sites More sharing options...
Recommended Posts
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.