Variable lists do not seem to work
-
-
@Frostion Oh the problem is the
givesMovementdoesn't allow a list of units. So you can't have this:<option name="givesMovement" value="-1:unit1:unit2:unit3"/>You have to do this:
<option name="givesMovement" value="-1:unit1"/> <option name="givesMovement" value="-1:unit2"/> <option name="givesMovement" value="-1:unit3"/>So you can't use the variable list for those currently. Would be a good feature request to allow a list of units in a single line so the first example above would work

-
@redrum Oh! I will make this feature request immediately!

https://forums.triplea-game.org/topic/1586/allow-unit-property-givesmovement-to-use-variable-lists
-
@redrum, @Frostion
Isn't 'givesMovement' an array list, and needs '-reset-'? So would something like this work:<attachment foreach="$AllLandUnits$^$AllAirUnits$" name="unitAttachment" attachTo="Frost-Trap" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="isInfrastructure" value="true"/> <option name="givesMovement" value="-1:@AllLandUnits@"/> <option name="givesMovement" value="-1:@AllAirUnits@"/> <option name="destroyedWhenCapturedFrom" value="$AllPlayers$"/> </attachment>Cheers...
-
@wc_sumpton I don't believe so. The foreach would be creating multiple separate unit attachments not multiple options in the same attachment.
-
@redrum Yea caught that after I'd posted it (Watching American football). I believe that with a trigger this same thing could be achieved.
Cheers...
-
@wc_sumpton Yeah, I think you could do it with variable list + a trigger using it to essentially generate triggers to add to the unit attachment givesMovement list. But that is kind of messy for defining the unit attachment that isn't changing so decided it was worth updating the property to allow a list of unit types

-
Hello,
I'm new creating maps, but i just finished one
Im trying to use variables to clean the code but i'm receaving this message when i try. It's in spanish, but i think its quite clear.

<variableList> <variable name="prueba"> <element name=""/> </variable> </variableList>ĀæCan you please tell me what I'm missing?
Thanks
-
@Martin-MadueƱo What version of TripleA are you using? Variables haven't been added into the stable release yet (1.9.0.0.13066) so you need to use the pre-release which can be downloaded here: https://github.com/triplea-game/triplea/releases
-
@redrum Thanks, i will try with pre-release :grinning_face_with_smiling_eyes:
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better š
Register Login