Make a core player-selectable

Started by Xindaris, September 29, 2020, 12:59:33 PM

Previous topic - Next topic

Xindaris

I have a core that requests ammo from the player to do something. If possible, I'd like the player (with generally the default interface) to be able to select the core as a unit and tell it to "stop resupply" just like you can with regular player units. I can't find any simple utility to do that; is there a good example of this sort of function I could read up on to try and figure out a way to do it?

GoodMorning

The short answer is "no".
The long answer is "we've been looking at this kind of thing for years, and nobody's found a good way to do it without heavyweight scripting".
The middling answer is "haha, nope".

I'd suggest allowing the player to toggle it by clicking or double-clicking, if it's just one unit.
A narrative is a lightly-marked path to another reality.

Xindaris

Eh...to be honest, I've warmed up to the idea of having the core constantly requesting packets just be a thing the player has to deal with in this map. It should be easy enough for them to destroy/disable relays and collectors within range of it. But thanks for your response anyway, as that gives me the confidence that it'd be too much trouble to try to work the other way anyway.

cornucanis

Here's an example of some selection code I've reused a few times. This is originally from an AC bertha unit, I tried to remove most of the irrelevant stuff but I left some of it in to give an idea of how it's meant to flow. It may also be missing a few pieces since I snipped it from the larger script, but this should at least give you an idea of how to generally structure things if you do decide to go down this route.