Page 1 of 1

Bug with CONVERT_TO and new objects (v0.24)

Posted: Sat May 17, 2003 1:07 am
by Gambit37
Consider this code:

Code: Select all

ADD	MISC_BOX_MAGIC_RED_0		CLONES=(MISC_BOX_MAGIC_GREEN)		NAME=(MAGIC BOX)		BITMAPS=(ICON:BITMAP_ICON_MISC_BOX_MAGIC_RED_0)
ADD	MISC_BOX_MAGIC_RED_1		CLONES=(MISC_BOX_MAGIC_GREEN)		NAME=(MAGIC BOX)		BITMAPS=(ICON:BITMAP_ICON_MISC_BOX_MAGIC_RED_1)		PROPERTIES=(CONVERT_TO:MISC_BOX_MAGIC_RED_0)
ADD	MISC_BOX_MAGIC_RED_2		CLONES=(MISC_BOX_MAGIC_GREEN)		NAME=(MAGIC BOX)		BITMAPS=(ICON:BITMAP_ICON_MISC_BOX_MAGIC_RED_2)		PROPERTIES=(CONVERT_TO:MISC_BOX_MAGIC_RED_1)
ADD	MISC_BOX_MAGIC_RED_3		CLONES=(MISC_BOX_MAGIC_GREEN)		NAME=(MAGIC BOX)		BITMAPS=(ICON:BITMAP_ICON_MISC_BOX_MAGIC_RED_3)		PROPERTIES=(CONVERT_TO:MISC_BOX_MAGIC_RED_2)
ADD	MISC_BOX_MAGIC_RED_4		CLONES=(MISC_BOX_MAGIC_GREEN)		NAME=(MAGIC BOX)		BITMAPS=(ICON:BITMAP_ICON_MISC_BOX_MAGIC_RED_4)		PROPERTIES=(CONVERT_TO:MISC_BOX_MAGIC_RED_3)
ADD	MISC_BOX_MAGIC_RED_5		CLONES=(MISC_BOX_MAGIC_GREEN)		NAME=(MAGIC BOX)		BITMAPS=(ICON:BITMAP_ICON_MISC_BOX_MAGIC_RED_5)		PROPERTIES=(CONVERT_TO:MISC_BOX_MAGIC_RED_4)
RTC gives critical errors stating that it can't find any of the new objects. I took care to ensure that they were defined in the correct order but it doesn't make any difference. It appears that when using the CONVERT_TO parameter, RTC isn't checking the list of newly created objects, so it thinks they don't exist. Am I right? Can this be fixed?

This is a bugger as I was just about to build a fancy example for my sample dungeon but it'll have to wait for now...

Posted: Mon May 19, 2003 10:22 am
by George Gilbert
Yes you were right :-)

RTC v0.24 (i.e. the released version) added the objects to the dungeon only after all new objects were defined - this means that one new object can't reference another new object.

I've already made a change to V0.25 to correct this!

Posted: Mon May 19, 2003 7:25 pm
by TheMormegil
Gambit : I don't know what you are trying to achieve there
but if its just a multiple use magic box you can already do
that by using CHARGE=(x) iirc.
I'm sure you knew that allready though...which makes me quite
interested in what it actually *is* you intend to do?

Posted: Mon May 19, 2003 8:51 pm
by Gambit37
Yup, I know about the CHARGE parameter but I want to show different graphics for the box as it loses it's charge...

Posted: Sun Dec 21, 2003 2:03 pm
by George Gilbert
Fully working in V0.27