Staredit Network

Staredit Network -> Concepts -> Terran Building Anti-Lifting
Report, edit, etc...Posted by Robi on 2004-12-18 at 10:47:04
[CENTER]Terran Building Anti-Lifting[/CENTER]
[CENTER]Download Sample Map[/CENTER]

Hello ! I am wondering if there is a better way to do these functions :
  • Small amount of location (1-4)
  • Disable lifting
  • Can continue to train units
  • Don't "kill" the building, or remake it ...
  • Work for all the buildings of all the players.
  • Normal amount of triggers (5)
Ok, now, i show you what i made :

Locations :
  • Anti Lift : Large location on all the buildings, only air checkbox are checked
  • Replacer : Small Location (4*3), only air checkbox are checked
Units :
  • Buildings : You need them placed, or create them with triggers...
  • Observers : For Player12, You need one observer by building, placed or created at the middle of the building
Triggers :
Trigger
Conditions:
¤ Bring(CurrentPlayer, AtLeast, 1, Buildings, Anti Lift);
Actions:
¤ Comment("Anti Lift");
¤ MoveLocation(Replacer, Buildings, CurrentPlayer, Anti Lift);
¤ MoveLocation(Replacer, Observer, P12, Replacer);
¤ SetSwitch(Switch 1, Set);
¤ PreserveTrigger();


Trigger
Conditions:
¤ Switch(Switch 1, Set);
¤ Bring(CurrentPlayer, AtLeast, 1, Command Center, Replacer);
Actions:
¤ SetSwitch(Switch 1, Clear);
¤ CreateUnit(1, Command Center, Replacer, CurrentPlayer);
¤ Wait(0);
¤ RemoveUnitAtLocation(All, Buildings, CurrentPlayer, Replacer);
¤ PreserveTrigger();


Trigger
Conditions:
¤ Switch(Switch 1, Set);
¤ Bring(CurrentPlayer, AtLeast, 1, Barracks, Replacer);
Actions:
¤ SetSwitch(Switch 1, Clear);
¤ CreateUnit(1, Barracks, Replacer, CurrentPlayer);
¤ Wait(0);
¤ RemoveUnitAtLocation(All, Buildings, CurrentPlayer, Replacer);
¤ PreserveTrigger();


Trigger
Conditions:
¤ Switch(Switch 1, Set);
¤ Bring(CurrentPlayer, AtLeast, 1, Factory, Replacer);
Actions:
¤ SetSwitch(Switch 1, Clear);
¤ CreateUnit(1, Factory, Replacer, CurrentPlayer);
¤ Wait(0);
¤ RemoveUnitAtLocation(All, Buildings, CurrentPlayer, Replacer);
¤ PreserveTrigger();


Trigger
Conditions:
¤ Switch(Switch 1, Set);
¤ Bring(CurrentPlayer, AtLeast, 1, Starport, Replacer);
Actions:
¤ SetSwitch(Switch 1, Clear);
¤ CreateUnit(1, Starport, Replacer, CurrentPlayer);
¤ Wait(0);
¤ RemoveUnitAtLocation(All, Buildings, CurrentPlayer, Replacer);
¤ PreserveTrigger();


NB :
Wait(0); is not required, but it removes the "flash" when you lift the building
Report, edit, etc...Posted by TheOddAngel on 2004-12-18 at 10:51:44
this is prety basic...

This isn't new or anything its been done for a long time now...
PS: You dont need the wait...

because the building isn't on the ground it wont be in the way of the new one being created...

Also you don't even need the 2 Locations... just have

Is player_ brings at most 0 buildings to locaion ___
Create 1 buildign there and remove 1 building at location ___
Report, edit, etc...Posted by LegacyWeapon on 2004-12-18 at 10:52:45
We already have a perfect tutorial for it tongue.gif
SaLaCiouS(U) has yet to add it.
It is 2 locations for all buildings.
Report, edit, etc...Posted by LegacyWeapon on 2004-12-18 at 11:00:33
2 locations tongue.gif
The zergling location isnt used. It was accidental.
Report, edit, etc...Posted by Robi on 2004-12-18 at 11:20:15
lol, u didn't used what i explained, your map has nothing interesting...
Report, edit, etc...Posted by Lisk on 2004-12-18 at 11:30:40
THAT was even in my 1st map, lol...
its like a trigger and its backup o_O

and you dont need the 2nd location tongue.gif
Report, edit, etc...Posted by skillledghost on 2004-12-18 at 12:41:02
i just cant help but think you guys down on me win iv left the forum so i keep checking but thers still non of what iv herd lol jk i dont even no you pplz w00t.gif ranting.gif wink.gif
Report, edit, etc...Posted by MapUnprotector on 2004-12-18 at 14:22:25
heh legacy i made that example map
skilledghost your anti lift is good but if you had a lot of terran buildings it wouldnt be practical to have a location for each of them
Report, edit, etc...Posted by DjDTM on 2004-12-19 at 01:02:04
There is probably a even more perfect and even more simpler way to do what you've just explained.
Report, edit, etc...Posted by Mini Moose 2707 on 2004-12-19 at 11:36:36
Here, I'll make this really simple.
No Switches.
2 Locations for ALL buildings.

Locations
- "buildings" Location covering all liftable buildings.
- "center" 4x3 location to center on the buildings.


Trigger
Description:
AntiLift
Players:
¤ Lifting Players
Conditions:
¤ Current Player brings at least 1 (building type) to "center"
Actions:
¤ Move location "center" to (building type) for Current Player at "meh"
¤ Remove all (building type) for Current Player at "buildings"
¤ Wait 10 ms (I don't mind this "flash", but you claim this stops it)
¤ Create 1 (building type) at "center" for Current Player
¤ Preserve Trigger


One trigger for each building, you're done.
Report, edit, etc...Posted by Robi on 2004-12-19 at 11:44:58
I'm not sure your triggers will work perfectly, i ever tried that, i think, when u lift the building, it remake it, but not at the same place (a bit upper).
For me, sometimes it moves of place and sometimes it stays normal, but it's not really perfect, huh ?
Report, edit, etc...Posted by DjDTM on 2004-12-19 at 14:09:15
Nicely done, only if there was away around, they lame snapto grid INGAME.

You could just make the location really tiny, about .25x.25 (Smaller than the standard 1x1.) Using SCMDraft or Starforge.

And it would be fine. I don't think the location has to be the EXACT size of the building.
Report, edit, etc...Posted by Spite on 2004-12-19 at 15:13:10
QUOTE(DjDTM @ Dec 19 2004, 02:09 PM)
Nicely done, only if there was away around, they lame snapto grid INGAME.

You could just make the location really tiny, about .25x.25 (Smaller than the standard 1x1.) Using SCMDraft or Starforge.

And it would be fine. I don't think the location has to be the EXACT size of the building.
[right][snapback]112277[/snapback][/right]

ur right it dosent have to be the same size as the building its possible to use a smaller location
Report, edit, etc...Posted by Robi on 2004-12-19 at 15:37:26
that dont change anything to the concept.... i just want to know if there is a better way to do that.
Report, edit, etc...Posted by chuiu on 2004-12-19 at 16:30:37
Untill we can hack the game through maps or a new unforseen function found in maps are found there is no other possible ways other then remove re-add.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-12-19 at 16:33:04
First trigger – Second move Location action completely contradicts the first one. It won’t allow the location to center on the observer near the building but it will center on the left most observer. I get what your trying to do but it isn’t done correctly.

Also save your self the switch and combine the trigger like MiniMoose said.
Also I’m not sure what ‘flash’ your talking about and I don’t know how making it take longer would help remove it.
I do know with both of your triggers the wait could mess up the trigger if another building is lifted at the same time. With your example even if another building isn’t lifted at the same time the wait will cause triggers to be checked again and since you haven’t removed the building yet the first trigger will go off again, leaving your switch Set. (it amazes me how people can actually pull this sort of stuff off with pure dumb luck. If I analyze it further I realize that the switch does nothing at all even if you removed it completely it will work the same way.)

If you want to get creative you could use the grid system to center a location below where the building lifted up to. (since they all lift to the same height and are therefore all offset the same distance).
Report, edit, etc...Posted by ChaosRyder on 2004-12-19 at 19:38:01
There is nothing new... I think there is tutorial on this. When youre posting some thing, be shure it's not in the tutorial thing...
Report, edit, etc...Posted by Robi on 2004-12-20 at 06:55:43
QUOTE
First trigger – Second move Location action completely contradicts the first one

Ok, i fixed that, huh.... sorry
QUOTE
Also save your self the switch and combine the trigger like MiniMoose said.
Do you program in any language ?? Me, I like functions, so I like switchs ! That all, and that don't change anything to the system, it's just a "design" of trigger if u prefer wink.gif
QUOTE
Also I’m not sure what ‘flash’ your talking about and I don’t know how making it take longer would help remove it.

Grrrrrrrr ! Try the sample map !
i made the command center WITH flash and others without flash !
U'll see what i mean by "flash"
QUOTE
I do know with both of your triggers the wait could mess up the trigger if another building is lifted at the same time. With your example

Well, i ever tried to lift all buildings at the same time, and it worked perfectly for me, did you tried ??
QUOTE
(it amazes me how people can actually pull this sort of stuff off with pure dumb luck. If I analyze it further I realize that the switch does nothing at all even if you removed it completely it will work the same way.)

Think what you want... I just like the switchs, and if i remove only one action or condition, my triggers won't work anymore, so, .... I don't see why do you think that, I'm sure you didn't dled the sample map sick.gif
QUOTE
There is nothing new... I think there is tutorial on this. When youre posting some thing, be shure it's not in the tutorial thing...

Lol, that tutorial was fast done, and i don't like it, very buggy, I'm SURE you didn't tried my sample map and the trigger in the tutorial, else u should have understand.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-12-20 at 11:55:13
ok I downloaded it and tried it. I see what your talking about the flash now. The flash is the building appearing to 'jump' to another location. When you create the replacement a small increment of time before you remove the lifted one then it will appear more like a shift.

Also I disabled all the actions and conditions relating to the switches. Worked the same way.

Then i decided to run another test to determan if my theroy about the switch saying set was true, Well it was. Make a new trigger to test when the switch is set. like (switch 1 is set / display text).

If you lift the building without the wait then you won't see the text. But if you lift any of the other buildings then the switch will remain set and you will be flooded with the display text. It will then stop if you lift the command center again.

Anyways i think you should devise a trigger that works without the creator knowing in advance where the buildings are. AKA, without the observer.
Report, edit, etc...Posted by LegacyWeapon on 2004-12-20 at 14:52:33
QUOTE(Robi @ Dec 18 2004, 11:20 AM)
lol, u didn't used what i explained, your map has nothing interesting...
[right][snapback]111866[/snapback][/right]

Nothing Interesting eh? You just deleted your post. Give credit to ScV_devilesk for making that map. You changed the triggering so that the observer is above the building instead of a cocoon.
Report, edit, etc...Posted by MapUnprotector on 2004-12-20 at 15:49:30
QUOTE(Mini Moose 2707 @ Dec 19 2004, 12:36 PM)
Here, I'll make this really simple.
No Switches.
2 Locations for ALL buildings.

Locations
- "buildings" Location covering all liftable buildings.
- "center" 4x3 location to center on the buildings.














Trigger
Description:
AntiLift
Players:
¤ Lifting Players
Conditions:
¤ Current Player brings at least 1 (building type) to "center"
Actions:
¤ Move location "center" to (building type) for Current Player at "meh"
¤ Remove all (building type) for Current Player at "buildings"
¤ Wait 10 ms (I don't mind this "flash", but you claim this stops it)
¤ Create 1 (building type) at "center" for Current Player
¤ Preserve Trigger


One trigger for each building, you're done.
[right][snapback]112222[/snapback][/right]


That will glitch sooner or later, the reason i had cocoons was to recenter the location on the correct spot so the building respawns exactly where it lifted off. When you lift off a building sometimes when it respawns it actually moves up because it changes elevation
Using observers is also really no different than using cocoons, the reason i used cocoons was because at first i used observers for the players in game rather than p12 so they kept moving, but I guess since p12 works then use p12 observers

EDIT:
Also even though they are p12 observers they can still be moved if lots of air units are placed around them, cocoons on the other hand cannot be moved
Report, edit, etc...Posted by Robi on 2004-12-25 at 07:03:12
I don't like ugly cocoons ! smile.gif
Report, edit, etc...Posted by MapUnprotector on 2004-12-26 at 18:10:15
Well observers can be moved
Report, edit, etc...Posted by Staredit.Net Essence on 2004-12-26 at 21:04:08
Heres a no lift map that i made along time.. Its really good and the best for no lift censored.gif

[attachmentid=3540]
Report, edit, etc...Posted by (U)Bolt_Head on 2004-12-27 at 04:56:41
I hate it when people use Kill instead or Remove without justification.
Next Page (1)