Help on creating an array of stored units.

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
User avatar
beetlenaut
Developer
Posts: 2814
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Help on creating an array of stored units.

Post by beetlenaut »

Celtic_Minstrel wrote: February 17th, 2021, 5:37 am Why do this when you can store the array in the ship itself as a unit variable?
Yeah, that's one of the improvements I was thinking of. However, keeping them separate seemed less complex, and it would make the output of :inspect easier to parse. (This is based on my experience teaching WML.) It wouldn't be too hard to move the array after it was working.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Ravana
Forum Moderator
Posts: 2948
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Help on creating an array of stored units.

Post by Ravana »

Unit id contains "-" usually. So it would need extra logic to convert into legal variable name.
Post Reply