• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Help with new building for Kingdom Builder

direinsomniac

Well-known member
Project: Kingdom Building (needs help)

I am trying to code a new building called a Levee.

This particular structure is supposed to be built next to a river or ocean.

I've looked at various other water-related buildings in the list, but not able to come up with the proper Expr-Req.


This is what I have:
tagis[HexFeature.WaterR?] | tagexpr[HexFeature.Water?] <> 0
 
Last edited:
tagis[HexFeature.WaterR?] | tagexpr[HexFeature.Water?] <> 0
This not exactly formed right. Tagis and Tagexpr are two separate boolean functions that return either TRUE/FALSE. You could do this:

Code:
tagis[HexFeature.WaterR?] + tagexpr[HexFeature.Water?] <> 0

But sense you have a tagexpr function you should most likely combine that expression logic into it instead:
Code:
tagexpr[HexFeature.WaterR? | HexFeature.Water?] <> 0

You can only use | and & inside a expression not in between functions. If you wanted to use tagis[] functions you would do this:
Code:
tagis[HexFeature.WaterR?] + tagis[HexFeature.Water?] <> 0
 
I'm still a bit of an amateur coder, what is the different between tagis and tagexpr?

And which would be better to use in this instance?
 
Back
Top