Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to spawn units without reinforcing, with a maximum count #58

Open
birgersp opened this issue Dec 30, 2016 · 4 comments
Open

Comments

@birgersp
Copy link
Owner

:spawn()
:setSpawnTimer(sec)
:setMaxUnits(num)
@thebgpikester
Copy link

GOALS:

  • Remove the need to put units on the map
  • Provide the ability to have more units than you would really want available, but hide them
  • Be able to link them to an object like a warehouse to give them a "home"
  • To provide a logistics "rate" of production

So i'd add
:setSpawnRate(units/min)
:setStaticBase(BOOL) --do we need this if we set the zone name??? Probably not... the two could work together
:setStaticWarehouse("unitname") --empty for no name
:setStaticWarehouse("unitname") --multiples available
:setWarehouseContents("UNITTYPE","UNITTYPE") ---problem - how to set unit details like speed and skill? Do we need an array type here?

@thebgpikester
Copy link

see #57 for discussing problem of units outside a Task Force being handled.

@birgersp
Copy link
Owner Author

birgersp commented Jan 3, 2017

I was exploring how "setSpawnRate" would work and I'm not sure I agree with it.

I'd argue that setSpawnRate(units/min) and setSpawnTimer(time) does the same thing, given that the desired unit type and group size is pre-defined.

Also, setSpawnRate implies that units are continously spawned one at a time. I'd prefer a bunch of units to be spawned at once every time interval, rather than having units spawn one-by-one.

Example use:

autogft_TaskForce:new()
  :addUnitSpec("M-1 Abrams", 4) -- 4 tanks each time
  :setSpawnTimer(600) -- Spawn every 600 seconds
  :setMaxUnits(40) -- Maximum number of units: 40

I'm trying to separate the terms "spawning" and "respawning" here. The latter is only for reinforcing dead units, while the former is spawning units regardless of previously spawned units are dead or not. Maybe I should use other terms to separate the two...

Regarding "home" building I have the following suggestion:
addBaseObject: Adds a "base object" for this task force. The task force will respawn on its location, only when the object exists (i.e. not destroyed, using this condition).

Thoughts?

  • Provide the ability to have more units than you would really want available, but hide them
  • To provide a logistics "rate" of production

Please elaborate

@thebgpikester
Copy link

Yes, its just wording with the "Spawn rate" vs "Spawn Timer" and yes it must be by group size because its cheaper, this is for sure. Your way is better described and better.
addBaseObject, yes, perfect, optional by omission!
More units than you want:
What i'm heading for here is that with Reinfirce you have to put down units in the play area. It's cheaper and easier to hide them as a number in the script.
Logistics rate:
Exactly as you proposed nothing else needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants