Author Topic: Addline + max uses?  (Read 3246 times)

Offline Kilkakon

  • Sergeant
  • **
  • Posts: 11
    • View Profile
    • Kilkakon.com
Addline + max uses?
« on: July 02, 2018, 09:41:11 am »
Simple question for you guys, and I'm pretty sure the answer's "no", but thought worth asking regardless:

I am using addline in my mapscript to create some road segments. However, for each of my road groups, I want to have one of the modules only appear once, not any number of times as can happen currently. E.g. RXRRRR where R is the regular road tile and X is a car pileup. Multiple car pileups in a row would look a bit silly.

Is there a way to do this elegantly? Or do I have to make a large number of conditional addblock commands?

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Addline + max uses?
« Reply #1 on: July 02, 2018, 03:52:57 pm »
I don't think you can use blocks and maxUses with addLine, which would solve your issue.

The alternative would be to add additional road mapblocks so that the one with the piled cars has a low chance of being selected, although it won't avoid that map block appearing more than once.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Addline + max uses?
« Reply #2 on: July 02, 2018, 04:04:10 pm »
I think it would be reasonable to ask devs to add this feature (respecting maxUses in addLine). It is a versatile thing and probably shouldn't be too work intensive, though that's never easy to guess.

Offline Kilkakon

  • Sergeant
  • **
  • Posts: 11
    • View Profile
    • Kilkakon.com
Re: Addline + max uses?
« Reply #3 on: July 03, 2018, 06:46:34 pm »
Thanks for the confirmation guys. I think you're right in that it could make a good feature :)

I've gone with Hobbes' suggestion of making a lot of regular variations to reduce the odds of having the unique one pop up more than once. The results seem pretty good so far :)