View Full Version : Making a building remove itself
TTFTCUTS
11-02-2007, 09:44 AM
Is there a way to make a building remove itself from the map directly after construction? The closest I have come to this is making a wall type structure, which does remove itself (as far as health bar etc are concerned), but does not give the free unit I want it to give.
Before you say I should make a building which undeploys into the unit, it is for the AI to place deployed siege choppers in their base, which both can't be got from a structure undeploying, and aren't structures in themselves.
apple23
11-02-2007, 06:06 PM
What do you mean "remove itself"? do you mean an object that takes itself away visually and physically, (objects can't interact with it in ANY way, shape, or form) or just visually (can't be seen, but will act like the object that its rules file specifies) please state what you want help with in a very specific, clear, and organized manner.
(And BTW; walls don't "remove" their health bars. Walls are a part of a group of objects called 'overlay,' which are like terrain objects in behavior,(no health bars, unselectable, etc) but are more interactive ingame. For instance, you can interact with walls by destroying them, and tanks can run over them(fences). Most terrain objects cannot be destroyed or ran over or in any case have anything else done to them.
And for AI to deploy the seige chopper, try looking at the scripts for AI's handling of the GI. (deploys when in hold-ground-guard mode) Although you really don't need it; AI only builds a max of 2 seige choppers anyways.
TTFTCUTS
11-03-2007, 04:56 AM
Well, I knew about overlays not being structures themselves, what I meant about removing the healthbar is that they left the wall overlay behind rather than fully disappearing. (rather than an unselectable, untargetable, immune structure which is comparatively "visible")
I solved the problem, anyway.
I made the building target friendlies with a weapon which damages the square it sits in after it is created, so that it destroys itself. After that, setting debris to 0 and the explosion to nothing made it vanish with no trace. (A modified ore mining building method - instead of spreading ore, it kills itself :P)
Considering I am only working with a single gametype and not modifying maps to enable new AI triggers, deploying choppers that way would be a fairly pointless exercise (I actually tried it before posting here and came to the conclusion that it would be too much effort to edit every signle map to incorporate them)
P.s. Sorry about the fuzziness of the question in my first post. I'll try to make it clearer next time!
apple23
11-07-2007, 09:34 PM
extract Rules.ini (or rulesmd.ini for YR) and put it in your game folder. Any changes made are applied to every map permanently (or as long as the file stays in your RA2 folder)
But either way, + rep for good problem solving skills ^^
Also, depending on the case, you can also make the origional building invisible, so it is like it wasn't ever there, instead of vanish.
beegee7730
11-08-2007, 05:56 AM
make the building have the FreeUnit=SCHD tag?
TTFTCUTS
11-08-2007, 08:36 AM
Actually, the edit was in rulesmd.ini, and the building iteself has no image (but when you moused around it still showed the health bar, and that was the problem).
Making use of the invisible in game tag thing wouldn't work correctly either, as it would still block that square for building.
As for making the free unit the actual siege chopper, that doesn't work, as it stays in the "undeployed" form even when it explicitly places SCHD. I basically made an immobile tank which looks and acts just like the deployed chopper, made it mind control immune, and that works great.
Fenring
11-11-2007, 02:43 PM
Try a 0x0 foundation structure that gives FreeUnit=SCHD2, which should work; with SCHD2 being a copy of the deployed Siege Chopper. Since there's no foundation, there's nothing to select so you won't have a health bar, or occupy any space, and as long as you tag them the same in rules and art, you should have no errors, provided everything is done correctly.
The only drawback is the tooltip. 0x0 foundation structures don't display them but, if I'm reading right, this is for the AI only so this should not be an issue.
vBulletin® v3.8.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.