Author Topic: Cloak or disable attack on a structure/unit  (Read 7334 times)

StrikerShot21

  • Guest
Cloak or disable attack on a structure/unit
« on: 13 October 2004, 23:38:26 »
Is there a way to disable the enemy to attack certain units or structures? I want to create a mine layer but the enemies will shoot it before getting close enough for the mine to take effect.
« Last Edit: 1 January 1970, 00:00:00 by StrikerShot21 »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #1 on: 14 October 2004, 00:17:58 »
I don't understand exactly what you want to do, can you explain it a bit more in detail?
« Last Edit: 1 January 1970, 00:00:00 by martiño »

StrikerShot21

  • Guest
(No subject)
« Reply #2 on: 14 October 2004, 00:37:39 »
I want to be able to either cloak my soldiers so the enemies can not see them, or make it where the enemies will not attack my troops. I want it so I can create mines, the enemies will not see the mines and will therefore not destroy them or avoid them.
« Last Edit: 1 January 1970, 00:00:00 by StrikerShot21 »

Ayrin Greenflag

  • Horseman
  • ****
  • Posts: 188
    • View Profile
    • http://www.lostinn.com/ayrin
(No subject)
« Reply #3 on: 14 October 2004, 06:48:52 »
how u can put your units into a building?
and what's sight value variable?
« Last Edit: 1 January 1970, 00:00:00 by Ayrin Greenflag »

StrikerShot21

  • Guest
(No subject)
« Reply #4 on: 14 October 2004, 12:00:11 »
what? All I want is to make my units invisible. It's really not that hard to understand. Sight value is how far a unit can see, if a units sight is 1, it won't auto attack enemies until it gets close enough for it to see them.
« Last Edit: 1 January 1970, 00:00:00 by StrikerShot21 »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #5 on: 14 October 2004, 21:18:24 »
- You can't cloack units :(

- You can put units unto a building by making a cellmap for them. Many buildings in the game have cellmaps, such as the barracks, take a look to the xml files.
« Last Edit: 1 January 1970, 00:00:00 by martiño »

StrikerShot21

  • Guest
(No subject)
« Reply #6 on: 14 October 2004, 21:20:02 »
well, perhaps you have a solution for my mine system?
« Last Edit: 1 January 1970, 00:00:00 by StrikerShot21 »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #7 on: 16 October 2004, 11:47:53 »
I don't know how :(
« Last Edit: 1 January 1970, 00:00:00 by martiño »

FatedBloodshed_Designer

  • Guest
Re: Cloak or disable attack on a structure/unit
« Reply #8 on: 27 April 2009, 22:05:52 »
I have a plan (if anyone is still going to read this) we should make the unit have a transperent effect like glass for a unit or like some type of mirror. It would only be good online but better than nothing.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Cloak or disable attack on a structure/unit
« Reply #9 on: 27 April 2009, 23:17:22 »
If you make a unit with a cell map that is all zeroes, then the enemy can't attack it.  However, your own units can't interact with it at all either, like to build or repair it, so if you make a building like that, you have to start out with it.  I haven't tried giving a non-building unit a cell map, but I don't see why it couldn't be done.  I'll try it out tonight if I get a chance.

we should make the unit have a transperent effect like glass
I think you can do that already using alpha.

tucho

  • Ornithopter
  • *****
  • Posts: 369
    • View Profile
    • .::www.artbytucho.com::.
Re: Cloak or disable attack on a structure/unit
« Reply #10 on: 28 April 2009, 13:22:24 »
Quote
If you make a unit with a cell map that is all zeroes, then the enemy can't attack it.  However, your own units can't interact with it at all either, like to build or repair it, so if you make a building like that, you have to start out with it.  I haven't tried giving a non-building unit a cell map, but I don't see why it couldn't be done.  I'll try it out tonight if I get a chance.

you are right, I made a mine in this way for my stopped mod "alien invasion". That works (but, as you say, you can interact with those units after they be created)

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Cloak or disable attack on a structure/unit
« Reply #11 on: 28 April 2009, 16:32:12 »
you are right, I made a mine in this way for my stopped mod "alien invasion". That works (but, as you say, you can interact with those units after they be created)

How exactly did you make that mine? I tried many methods but none of them work properly.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

tucho

  • Ornithopter
  • *****
  • Posts: 369
    • View Profile
    • .::www.artbytucho.com::.
Re: Cloak or disable attack on a structure/unit
« Reply #12 on: 28 April 2009, 19:31:53 »
make a unit that have a cellmap with value 0, put 1 in attack range and put an splash attack value that kill your own unit, by this way the enemys won't see the the mine, the mine damage the enemys when they walk on the mine (or on 1 cell of distance) and the mine is shelf destructed with his own attack.

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Cloak or disable attack on a structure/unit
« Reply #13 on: 28 April 2009, 19:44:05 »
make a unit that have a cellmap with value 0, put 1 in attack range and put an splash attack value that kill your own unit, by this way the enemys won't see the the mine, the mine damage the enemys when they walk on the mine (or on 1 cell of distance) and the mine is shelf destructed with his own attack.

I actually did just that but the mines do not take damage from the splash.
I gave them 1 hp and the base attack does 100. but they do not die them selves. When i put the cell map to 1 then it works but can be targeted by enemies.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

tucho

  • Ornithopter
  • *****
  • Posts: 369
    • View Profile
    • .::www.artbytucho.com::.
Re: Cloak or disable attack on a structure/unit
« Reply #14 on: 29 April 2009, 20:09:28 »
yep, is true, I remember I had the same problem, units with cell map= 0 cant receive damage, after that I made a anti-tank dog unit, a really fast unit that is self destroyed with his own attack. Sorry for the previous wrong reply

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Cloak or disable attack on a structure/unit
« Reply #15 on: 30 April 2009, 01:02:18 »
yep, is true, I remember I had the same problem, units with cell map= 0 cant receive damage, after that I made a anti-tank dog unit, a really fast unit that is self destroyed with his own attack. Sorry for the previous wrong reply

Its ok. Its funny that I came up with a similar solution. Thanks for the input.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Cloak or disable attack on a structure/unit
« Reply #16 on: 30 April 2009, 03:53:35 »
Bah, I tried the 0 cellmap theory half a year ago. The best thing you can do for a mine is to make it a tough armor type that can only be defeated by itself. However, this would make the problem of ranged units never getting close enough. They'll just attack this thing and be sitting ducks...

*BTW: cellmaps SHOULD work with moving units perfectly fine, however, if I remember correctly, they cannot move if a unit is inside of them. Units can only be inside the cellmap of a unit while that unit is stopped.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert