Condition in the symbol element |
Post Reply |
Author | |
cmorais
Contributor Joined: 23.Mar.2018 Location: Ireland Points: 12 |
Post Options
Thanks(0)
Posted: 06.Sep.2018 at 15:31 |
Hi there! I'm creating a symbol that, if it has a explosion subgraph, it would show a small black circle in the corner... to show the user that this item has a subgraph. But I can't make it work... I think it is due to the MERL syntax. The generator that I'm using is do .() { explosions } In the script part, it returns the name of the explosion... But I think I'm missing somethig, because even when I put STRING = # (any string value), it doesn't work (no show). I think I have to call the "parent" object, or something like this. But I don't know how =/ Any help, please? =D |
|
stevek
MetaCase Joined: 11.Mar.2008 Points: 641 |
Post Options
Thanks(1)
|
# isn't any value, but any single character; any value is *, and any non-empty value is #*. NB both are only valid if you are doing a wildcard comparison with =~ rather than a simple string comparison with =.
From an object, do .() will go to any connected object, which is probably also not what you want. My guess is: do explosions { 'T' } and check that the result is not equal to the empty string.
Edited by stevek - 07.Sep.2018 at 12:26 |
|
cmorais
Contributor Joined: 23.Mar.2018 Location: Ireland Points: 12 |
Post Options
Thanks(1)
|
Yay, it worked! But not as an empty string, I had to use the #* wildcard. So i used the do explosions { 'T' } And the String =~ comparison with #* in the condition field. Thank you very much! |
|
stevek
MetaCase Joined: 11.Mar.2008 Points: 641 |
Post Options
Thanks(1)
|
Glad that you got it working! I guess with the empty string you had a simple mistake like forgetting to change the comparison to <> (not equal), or having a space or something in the text field so it wasn't empty.
|
|
Post Reply | |
Tweet |
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |