Staredit Network

Staredit Network -> Concepts -> Two-location Anti-Liftoff
Report, edit, etc...Posted by PCFredZ on 2007-01-19 at 17:41:58
This is an anti-liftoff system intended to replace the building lifted off by killing the building and creating a new one in its old spot on the ground. The design of the system should make it easily implemented with merely 2 locations for all the players. However, in my testing I have yet to see it recreate buildings in the exact same spot.

More than half the time the trigger runs, the new building will be created 1 to 2 grids above or below the intended creation region instead of exactly where the old building was lift off from.

While I can use one location for each building for each player, I hope some of you can figure out what is wrong with the 2-location method.


Trigger
Description:
Anti Liftoff
Players:
¤ Force1
Conditions:
¤ Current player brings at least 1 Command Center to AIR ONLY
Actions:
¤ Move location CREATE onto building owned by Current Player at AIR ONLY
¤ Kill all buildings for Current Player at AIR ONLY
¤ Create 1 Command Center for Current Player at CREATE
¤ Preserve trigger


(copied for all 6 Terran liftable buildings)
Report, edit, etc...Posted by Laser_Dude on 2007-01-20 at 01:14:04
That would be because of the iscript for terran buildings liftoff. Iscript tells the building to shift upwards, and leave the shadow in the same spot.

How to get around this? I dunno.
Report, edit, etc...Posted by PCFredZ on 2007-01-20 at 09:52:43
QUOTE(Laser_Dude @ Jan 20 2007, 12:14 AM)
That would be because of the iscript for terran buildings liftoff.  Iscript tells the building to shift upwards, and leave the shadow in the same spot.

How to get around this? I dunno.
[right][snapback]615745[/snapback][/right]

That's what I guessed, but the new buildings aren't only created above the original location, but sometimes below as well.
Report, edit, etc...Posted by Falkoner on 2007-01-20 at 10:54:52
Maybe the location detects it before it is truly in the air and centers the location then?
Report, edit, etc...Posted by PCFredZ on 2007-01-20 at 11:14:25
Unfortunately, that still doesn't explain the randomness.
Report, edit, etc...Posted by purple100 on 2007-01-20 at 12:28:12
Maybe you could fiddle with the size of the CREATE location. It might place the building differently.
Report, edit, etc...Posted by PCFredZ on 2007-01-20 at 13:12:47
I got this solution via PM:

QUOTE
Preplaced cocoons solve problem.

http://www.maplantis.org/index.php?map=435


The map works very well. I replaced the cocoons with P11 observers and it still works. One thing does perplex me: why does the Command Center in the upper right corner not need a Cocoon/Observer?
Report, edit, etc...Posted by Tuxedo Templar on 2007-01-20 at 13:29:30
Centering the location on the liftoff CC and then replacing it at that location is the culprit.

You only need one location for anti-liftoff, btw. You CAN create ground units at air-only locations. Just not detect them.
Report, edit, etc...Posted by Laser_Dude on 2007-01-20 at 13:46:30
Isn't the second location his giant air-only location, that covers the entire map?
Report, edit, etc...Posted by Falkoner on 2007-01-20 at 13:48:28
Yes, that's why he needs 2.
Report, edit, etc...Posted by Tuxedo Templar on 2007-01-20 at 14:26:21
But you need one per building anyway (or at least a way to recenter one for each spot). But meh doesn't much matter to have 1 extra if it adds some convenience.
Report, edit, etc...Posted by Kookster on 2007-01-20 at 20:28:21
Here you go I hope you enjoy!! Tell me what you think of the system and if you have any questions on how it works.

Note: I took out the explding building just for test purposes, and all the triggers in there are 100% required for it to work.
Report, edit, etc...Posted by chuiu on 2007-01-20 at 22:36:25
That uses three locations.
Report, edit, etc...Posted by Urmom(U) on 2007-01-20 at 22:45:06
Tux, I don't think you get what he's saying. He wants to detect ALL lifted off buildings on the entire map and replace them with just two total locations. If you were doing just one building then you could use just one location but if you were using 6 buildings you would need 2 locations.
Report, edit, etc...Posted by PCFredZ on 2007-01-20 at 22:49:34
It's alright. As I said previously, it's been solved.

One thing does perplex me: why does the Command Center in the upper right corner not need a Cocoon/Observer?

See if y'all can take a stab at that one.
Report, edit, etc...Posted by Kookster on 2007-01-21 at 02:23:00
meh 3 is fine isnt it?? and besides i bet that 3rd location will be used for other things anyway!!!

QUOTE
One thing does perplex me: why does the Command Center in the upper right corner not need a Cocoon/Observer?
What cocoon I didnt put any in there.
Report, edit, etc...Posted by Wormer on 2007-01-21 at 03:17:12
QUOTE
One thing does perplex me: why does the Command Center in the upper right corner not need a Cocoon/Observer?


I think they have forgotten to place it, bacause that CC is crawling upper when you lift it up.

I think this is what Tux had in a view.
Report, edit, etc...Posted by O)FaRTy1billion on 2007-01-21 at 03:30:22
QUOTE(PCFredZ @ Jan 20 2007, 08:49 PM)
One thing does perplex me: why does the Command Center in the upper right corner not need a Cocoon/Observer?

Assuming you are talking about the upper right corner of the entire map; are you suggesting it should go past the top edge of the map when you lift it off?
Report, edit, etc...Posted by Tuxedo Templar on 2007-01-21 at 04:22:19
QUOTE(Urmom(U) @ Jan 20 2007, 10:45 PM)
Tux, I don't think you get what he's saying.  He wants to detect ALL lifted off buildings on the entire map and replace them with just two total locations.  If you were doing just one building then you could use just one location but if you were using 6 buildings you would need 2 locations.
[right][snapback]616196[/snapback][/right]

Oh. No I wasn't paying close attention to the parameters. My bad.

You could use burrowed markers for each building. That way you don't need to center on the building or use obtrusive air units and you can recycle locations. That's one way. You will have to manage the markers with each building, though.
Report, edit, etc...Posted by Wormer on 2007-01-21 at 05:04:20
QUOTE
Assuming you are talking about the upper right corner of the entire map; are you suggesting it should go past the top edge of the map when you lift it off?


Have you seen this map: http://www.maplantis.org/index.php?map=435

There are buildings placed in the rectangle and right upper building have not got preplaced Cocon... I thought he was taking about this one blink.gif
Report, edit, etc...Posted by Kookster on 2007-01-21 at 05:20:29
you should try my version you dont need any preplaced units. And you can build more buildings and it will work for them too. So you save on units too.

QUOTE
Report, edit, etc...Posted by chuiu on 2007-01-21 at 10:10:33
Yours won't always work though, there could be air units in the area that screw it up.
Report, edit, etc...Posted by PCFredZ on 2007-01-21 at 11:33:28
QUOTE(Kookster @ Jan 21 2007, 04:20 AM)
you should try my version you dont need any preplaced units. And you can build more buildings and it will work for them too. So you save on units too.
[right][snapback]616322[/snapback][/right]

Yeah, use of mobile grids is good too. As chuiu said, existing air units would mess it up, but those can always be moved away and moved back later.
Report, edit, etc...Posted by Kookster on 2007-01-22 at 00:39:43
that is easily fixed, just have a location in some remote place, when the triggers happen have any air units there moved after the building lifts off, then when the building is recreated move them back. Ill go update my map for this ok.

The only down side is any air units there will stop moving thats if you lift it while they are above it!.


Heres the new version:
[attachmentid=22667]

So 4 locations total and it doesnt matter if you build new buildings, cmon thats pretty cool dont you think?!?!?
Report, edit, etc...Posted by PCFredZ on 2007-01-22 at 15:58:27
Kookster, can you experiment a little more with your mobile grids? The Create 9 Remove 4 Create 9 Remove 3 is quite a bit of steps and will create a considerably large grid system. Can it be reduced at all?
Next Page (1)