Reference elements not working in CE explosion content

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
Flumminator
Posts: 184
Joined: Fri Jun 18, 2004 8:08 pm
Location: Germany

Reference elements not working in CE explosion content

Post by Flumminator »

Hi Holger,

yesterday I tried to use reference elements in the explosion content of an explodable CE and it does not appear to work. After the explosion, the space is empty.

See attached example level, tested in 4.3.5.4
  • A: Explodable CE using reference elements for content - not working
  • B: Explodable CE using absolute elements for content - working fine
  • C: Changing CE using reference elements for content - working fine
I'm not sure whether this is intentional or not, but it's certainly not what I expected :roll:
Attachments
014.level
(743 Bytes) Downloaded 236 times
Flumminator->PostCounter += 1;
User avatar
Eizzoux
Posts: 571
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: Reference elements not working in CE explosion content

Post by Eizzoux »

It is intentional, since these elements aren't specifically made for usage in levels themselves, it's even told in their descriptions.
As their names say, they're referring to specific groups of elements or CE change page.
Here's an example: Create a custom element with these CE change settings.
kasdhkasjd.png
kasdhkasjd.png (30.68 KiB) Viewed 6956 times
After that, put it in the level, give it some open space, and in that space, place some random moving elements around it to let them move around and occasionally touch it. On playtesting you will see that it will start turning into the elements that it gets touched by.
ads1.png
ads1.png (208.93 KiB) Viewed 6956 times
ads2.png
ads2.png (209.65 KiB) Viewed 6956 times
ads3.png
ads3.png (209.12 KiB) Viewed 6956 times
ads4.png
ads4.png (209.33 KiB) Viewed 6956 times
'Touching -> REF Any element' means it can be triggered by any element (except player), and all it does is change it's look into whatever just touched it [Change CE Artwork -> Trigger], considering it was given a very wide range of elements to react to. Although this kind of use is pretty pointless, put one of the simplest to explain.
If you don't wanna make one, here's a simple example for you to check:
009.level
(1.19 KiB) Downloaded 237 times
𒈟
Flumminator
Posts: 184
Joined: Fri Jun 18, 2004 8:08 pm
Location: Germany

Re: Reference elements not working in CE explosion content

Post by Flumminator »

Yes, I do know how the reference elements work. I use the +/-<number> reference elements a lot when I build groups of CEs that interact with each other (so that I can easily copy&paste them to other levels when I want to re-use them). As you can see in my demonstration level, they work perfectly well, when used in the extended change target of the CE.

I assumed they would work the same way when used in the explosion content of a CE, but apparently they don't. Now it's up for Holger to decide if this is a bug or a feature ;)
Flumminator->PostCounter += 1;
Flumminator
Posts: 184
Joined: Fri Jun 18, 2004 8:08 pm
Location: Germany

Re: Reference elements not working in CE explosion content

Post by Flumminator »

Here with screenshots.

Works:
CE_change_reference.png
CE_change_reference.png (177.05 KiB) Viewed 6937 times
Doesn't work:
CE_explosion_reference.png
CE_explosion_reference.png (183.76 KiB) Viewed 6937 times
Flumminator->PostCounter += 1;
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Reference elements not working in CE explosion content

Post by Holger »

I'm not sure whether this is intentional or not, but it's certainly not what I expected :roll:
It is definitely not by intention, and more of a missing feature than a bug, I would say. :-)

I have just added support for reference elements in explosion content of custom elements, so you level now works as you expected. :-)

It's still not supported for the "can dig: [ ]" and "can [leave behind]: [ ]" element areas, but (same as with explosion content before) I am not sure if it can be that useful here. (If so, please let me know. Although I should probably add it just for completeness.)
Flumminator
Posts: 184
Joined: Fri Jun 18, 2004 8:08 pm
Location: Germany

Re: Reference elements not working in CE explosion content

Post by Flumminator »

Holger wrote: Sat Apr 08, 2023 11:33 am
I'm not sure whether this is intentional or not, but it's certainly not what I expected :roll:
It's still not supported for the "can dig: [ ]" and "can [leave behind]: [ ]" element areas, but (same as with explosion content before) I am not sure if it can be that useful here. (If so, please let me know. Although I should probably add it just for completeness.)
Yes, I think that would make sense, too. I can immediately see use for the -/+ reference to interact with neighbouring CEs.

Not remembering that they weren't supported, yet, I tried "can dig: [ * ]" the other day, wondering if it would also remove indestructible elements - and thus the level boundary - as well. So there's some bit of thought to be had, when implementing this :wink:
Flumminator->PostCounter += 1;
Post Reply