Member
Join Date: Aug 2014
Posts: 87
|
so I'm trying to swap images based on my attribute values. When I compile, I keep getting the following error message:
Hero Lab was forced to stop compilation after the following errors were detected: Portal 'health' - Reference to incompatible field type/style/behavior on portal type Here's my code: traits.str Code:
<!-- Health image name --> <field id="attImage" name="Image" type="derived"> <!-- Determine this value based on the current value of the attribute --> <calculate phase="Traits" priority="3001" name="Calc attImage"><![CDATA[ ~Note! Happens immediately after we get the final value of the related stat var image as string image = field[trtAbbrev].text & "-" & field[trtFinal].value & ".bmp" debug "Attribute Value" & image @value = image ]]></calculate> </field> Code:
<portal id="health" style="imgNormal"> <image_field field="attImage" istransparent="yes"/> </portal> |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
This is not a method that will work. Image portals in HL need to be for specific images, and can't be set on the fly through scripts.
|
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
I recommend leaving this sort of "nice-to-have" thing - making it pretty, until last - get it working first.
|
#3 |
|
|