|
Post by damooseneo on Aug 13, 2020 19:37:51 GMT
I'm trying to use a snippet from the old forums (http://magicseteditor.sourceforge.net/node/5498) and running into issues with the primary_choice; it keeps returning "true" as opposed to the value. The errors don't say anything about the bg_image2 function, so I assume that's alright.
bg_image1 := to_lower( primary_choice(card.background) ) + ".png"
bg_image2 := to_lower( remove_choice(choice: primary_choice(card.background), card.background ) )+ ".png"
bg_blend := {
if chosen(card.background, choice: "hybrid") then
linear_blend(
image1: bg_image1()
, image2: bg_image2()
, x1:0.4, y1:0, x2:0.6, y2:0.1
)
else bg_image1()
} Any other similar simple blend options?
|
|
kolya
1/1 Squirrel
Posts: 73
Formerly Known As: fedosu
Color Alignment: Blue, Red, Green
|
Post by kolya on Aug 14, 2020 17:21:44 GMT
Is this for Magic or a different game?
If it's for Magic, I believe the issue is that there is no card field named "background". The field that displays the background image is named"card_color", so your should be referencing "card.card_color" rather than "card.background".
If this is for a different game, I would double check what the relevant card field is named.
Never mind, that won't fix it. The primary_choice function is delivering you a single answer, but if the field is a multiple choice field and you have multiple selections then it just tells you that there is a choice selected ie. "true".
|
|
|
Post by damooseneo on Aug 18, 2020 3:15:12 GMT
Not great documentation; "Returns the name of the 'top level' choice selected" without indication its not intended to be used with Multiple Choice. Took a bit to suss out "Top Level" and realize it was intended for multi-level single choice lists, which themselves are poorly documented (found a good example within the VS System game files that helped me grok just how to handle that aspect).
BUT; worked out a script for merging two. Tests each entry; first one found becomes the first one, and then tests the rest of the entries possible, second one found becomes the second one. Be nice to pull a "multiple choice(0)", "multiple choice(1)" sort of array, but alas~
|
|