Page 2 of 2

Re: Custom Color Healing Crystals [RELEASE]

Posted: Wed Mar 13, 2013 11:01 am
by DeDy
I Admit It. Amazing game, and has amazing people for her to make the modification. However, Nightfall again begin to play, the latest beta test before the finish already with the original script for the Crystal.

EDIT: Black Floor?
Image

Re: Custom Color Healing Crystals [RELEASE]

Posted: Fri Mar 15, 2013 4:50 pm
by Diarmuid
Hmm. The crystal spawns an invisible pit. Normally, because floors are "hardcoded" on dungeon initialization, when you spawn a pit dynamically, the floor is still there. I'm not sure why this happened to you... you only used objects that start with dx_, right, not anything starting with a | and a red cross icon?

You can always make a floor decoration object and put it on top.

Sound fix is almost ready, working on it right now.

Re: Custom Color Healing Crystals [RELEASE]

Posted: Fri Mar 15, 2013 4:54 pm
by Xanathar
It happens after a reload afaik (that is, I use the same technique of spawning pits for my treasure chests and found the floor disappears after a reload).

Just place a fake floor decoration (either a floor drain or a floor model copied from the wallsets) to solve the issue.

Re: Custom Color Healing Crystals [RELEASE]

Posted: Fri Mar 15, 2013 5:06 pm
by Diarmuid
Thanks Xanathar, good to know!

Ok, v1.1 is on the nexus, fixing that sound bug.

Re: Custom Color Healing Crystals [V1.1 UPDATE]

Posted: Fri Mar 22, 2013 2:53 am
by Grimfan
Okay, I just started playing around with these (putting the party to sleep and teleporting them) when I decided to put the following small script into the custom crystal functions section.

Code: Select all

function onCrystalClick(crystal)
	
	if crystal.isActive and crystal.color == "green" then
	
		for i=1,4 do
		party:getChampion(i):insertItem(11-31,"grim_cap")
		end
	end


As soon as I clicked on the green crystal preview mode crashed on me (it just went dead though I was still in editor)

Now is this a problem with my simple script or is something else going on?

Re: Custom Color Healing Crystals [V1.1 UPDATE]

Posted: Fri Mar 22, 2013 3:00 am
by Diarmuid
Simple, you have to "create" the item before inseting it in the inventory.

So instead of :

Code: Select all

party:getChampion(i):insertItem(11-31,"grim_cap")
you want

Code: Select all

party:getChampion(i):insertItem(11-31,spawn("grim_cap"))
So you're not inserting a string variable saying "grim_cap" in the inventory, you're inserting a grim_cap item you spawned.

EDIT: Oh, and 11-31 doesn't work either. You need to make another for j = 11, 31 do ... insertItem(j, spawn... loop.

Re: Custom Color Healing Crystals [V1.1 UPDATE]

Posted: Fri Mar 22, 2013 3:26 am
by Grimfan
Yeah, I realized the script was incomplete shortly after posting it. :oops:

so here's the new script:

Code: Select all

for i=1,4 do
		for j=11,31 do
		party:getChampion(i):insertItem(j,spawn("grim_cap"))
		end
		end
	end
Now, is it supposed to insert a grim_cap into every champions slot, because now every single characters empty slot has a grim_cap in it? :lol:

EDIT: Ignore this comment. I'm still such a newbie at this!