Author Topic: only one unit  (Read 3088 times)

tripsahoy

  • Guest
only one unit
« on: 8 October 2008, 22:37:00 »
Is it possible to make a unit that you can only have one of

I want that unit to be produceable and once it dies to be able to produce another, so you would only have one at a time.
But i only want that for certin units.

would the code be like?

Unit recuirments
       <____________> "false
Unit recuirments

or something like that?

Thanks for the help

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: only one unit
« Reply #1 on: 9 October 2008, 04:26:01 »
I saw somebody else suggest making a custom resource, like "hero points" or something.  You could start with one hero point, and that special unit would require one hero point, just like how other units take energy.  If you want to expand the possibilities a little more, you could have your main building (Caste/Mage Tower/whatever) produce one hero point, so you could have one hero unit per main building.  I hope that helps!

tripsahoy

  • Guest
Re: only one unit
« Reply #2 on: 9 October 2008, 23:16:08 »
thats a good idea

but i was thinking of having multiple units that you can produce but only have one at a time so what it sounds like your saying is that the more main buildings you have the more hero points you have so their for i could have multiple of those units i only want one of at a time.

but thanks for the suggestion i really aprecheate it.

(sorry about the wrong spellings)

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: only one unit
« Reply #3 on: 10 October 2008, 00:41:36 »
You might be able to give the faction just one hero point at the beginning and have it stay constant the whole time, but I don't know how.

verarticus

  • Guest
Re: only one unit
« Reply #4 on: 10 October 2008, 03:56:07 »
go to the resouce file copy and paste one and rename it and open it with notepad and chane it to give one hero_point or something and then go to factions and choose the taem teck for example there will be a text document name teck open it with notepad an change this
<resource name="gold" amount="500"/>
      <resource name="wood" amount="500"/>   
      <resource name="stone" amount="500"/>   
      <resource name="food" amount="50"/>   
to this
<resource name="gold" amount="500"/>
      <resource name="wood" amount="500"/>   
      <resource name="stone" amount="500"/>   
      <resource name="food" amount="50"/>
                   <resource name="hero_point" amount="1"/>

then make the hero require one hero_point and dont have any building that can make hero_points.

mictes

  • Guest
Re: only one unit
« Reply #5 on: 10 October 2008, 11:10:49 »
Hey, how to hide ressources in GAE ?!

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: only one unit
« Reply #6 on: 12 October 2008, 20:07:26 »
Add the line <display value="false"/> between the <resource> tags.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

tripsahoy

  • Guest
Re: only one unit
« Reply #7 on: 13 October 2008, 12:20:26 »
ya ok but is something like this possible to do or do i have to do the hero points thing
Quote from: "tripsahoy"
Unit recuirments
       <____________> "false
Unit recuirments

or something like that?

mictes

  • Guest
Re: only one unit
« Reply #8 on: 13 October 2008, 12:48:44 »
Its not possible yet.

modman

  • Guest
Re: only one unit
« Reply #9 on: 13 October 2008, 20:57:05 »
What if I want to limit it to two units?  Or five?

tripsahoy

  • Guest
Re: only one unit
« Reply #10 on: 13 October 2008, 21:05:27 »
Quote from: "modman"
What if I want to limit it to two units? Or five?

YA

and what if i want to have different units that i only want one of
could i have hero points1, hero points2, etc.?

PS. modman my new computer is the you know what, it amazingly beasty sweet

verarticus

  • Guest
Re: only one unit
« Reply #11 on: 14 October 2008, 13:00:40 »
Quote from: "tripsahoy"
Quote from: "modman"
What if I want to limit it to two units? Or five?

YA

and what if i want to have different units that i only want one of
could i have hero points1, hero points2, etc.?

PS. modman my new computer is the you know what, it amazingly beasty sweet

yes just make a different resource for different unit (youll have to put up with the icon at the top though) and if you want more then just make more points you start with   example
unit 1 =1 hero point + starting 5 hero points =5 units

modman

  • Guest
Re: only one unit
« Reply #12 on: 14 October 2008, 21:57:52 »
Yea, good idea, but that solution isn't very compatable with magitech.  People generally don't like to add resources to the tech tree (at least I don't).

tripsahoy

  • Guest
Re: only one unit
« Reply #13 on: 15 October 2008, 01:51:10 »
Quote from: "verarticus"
yes just make a different resource for different unit (youll have to put up with the icon at the top though) and if you want more then just make more points you start with example
unit 1 =1 hero point + starting 5 hero points =5 units

Good idea I think I'll do that

thanks a lot  8)

usatonme

  • Guest
Re: only one unit
« Reply #14 on: 15 October 2008, 23:00:14 »
could you do the same hero point thing but allow you to have buildings that can use the hero point to upgrade the hero?

verarticus

  • Guest
Re: only one unit
« Reply #15 on: 17 October 2008, 14:01:37 »
Quote from: "usatonme"
could you do the same hero point thing but allow you to have buildings that can use the hero point to upgrade the hero?

yes its the same thing just make it cost hero points instead of gold, wood, or stone.