Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
barrelv
Member
 
Join Date: Aug 2014
Posts: 87

Old September 2nd, 2014, 09:15 AM
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>
tab_basics.dat
Code:
    <portal id="health" style="imgNormal">
      <image_field field="attImage" istransparent="yes"/>
    </portal>
barrelv is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 11th, 2014, 09:53 AM
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.
Mathias is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 11th, 2014, 09:54 AM
I recommend leaving this sort of "nice-to-have" thing - making it pretty, until last - get it working first.
Mathias is offline   #3 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:16 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.