Staredit Network

Staredit Network -> Concepts -> Controllable Vision
Report, edit, etc...Posted by Tuxedo Templar on 2005-05-22 at 13:02:41
I hate 'em. Of the things I can whine to Blizzard about Starcraft, map revealers are one of them. You can't move, kill/remove at location, or give them with triggers, you can't control their elevation properties, and you can't do squat to adjust their width.

So naturally, I went and found a way around them. It's nothing tremendously new or difficult, but I'm surprised I've never seen it used or thought of before. If anyone has trouble understanding the following trigger, you probably should find a new hobby:
Trigger
Conditions:
¤ Always (or whatever condition you want to determine when vision should be on or off)
Actions:
¤ Create 'Zerg Scourge' at location 'Gimme Light' for 'Current Player'.
¤ Remove 'Zerg Scourge' at location 'Gimme Light' for 'Current Player'.
¤ Preserve trigger.

That's it! Nothing more. Well, that and hyper triggers.

Basically, it will cast the vision of the scourge, but the unit will remain unseen. There is a minor glitch though, as every 2-3 seconds for exactly one frame SC will fail to render the vision, which only becomes a problem if you have cloaked buildings and such at that area (which show up under the fog of war for that one frame), or if keeping a non-vision unit selected continuously under that area is somehow necessary to the gameplay.
Report, edit, etc...Posted by chuiu on 2005-05-22 at 13:04:21
Yeah I've done that in a couple maps, and used terran mines when I didn't want players to have vision above cliffs.
Report, edit, etc...Posted by Tuxedo Templar on 2005-05-22 at 13:08:04
It just seems common sense to me, but then again I suppose not everyone thinks that SC would render a unit's vision in the almost 0 time between creating and removing it.

One other warning: lag. If a lot of these are being used in a map, it can take a toll on latency, so I suggest using them fruggly (sp).
Report, edit, etc...Posted by BeeR_KeG on 2005-05-22 at 13:17:04
If used a similar system before in one of my Test Maps and it didn't create those minor glitches that you siad from what I saw.

Instead of continously create/removing scourge at that location instantly, meaning that about 12 scourge will be created/removed every second.

Now here's what I would change. As all of us know, once a unit dies or moves from a spot in the map, either by the move trigger or the unit physically moves, the previous Fog of War that the unit had is still visible for about 1 second.

You could just do this:
Trigger
Conditions:
¤ Always
Actions:
¤ CreateUnitsAt (PX, Scourge, 1, Vision Location);
¤ RemoveUnitsAt (PX, All, Scourge, Vision Location);
¤ Wait (1000); (Or any other method of waiting, I don't know what the exact time to wait is.)
¤ PreserveTrigger();


This way you don't have so many scourge or any unit being created so often causing unwanted lag.
Another advantage is that if the unit is killed, the area of vision stays there but it gets smaller. This way you can have much smaller area of vision.
Report, edit, etc...Posted by Tuxedo Templar on 2005-05-22 at 13:24:20
Hmm, I don't see how adding a wait would get rid of the glitches. If anything I'd guess it would make it worse. I'll have to try that out when I get home...

They arn't really noticable unless you are specifically looking for them or have cloaked buildings, though.
Report, edit, etc...Posted by RexyRex on 2005-05-23 at 00:08:11
I just realized...
StarCraft is 12 frames per second. Cool.
(Flash anybody?)
Report, edit, etc...Posted by MapUnprotector on 2005-05-23 at 00:24:41
Simple concept, just never needed to use it before tongue.gif
Report, edit, etc...Posted by Screwed on 2005-05-23 at 01:58:29
This is very interesting, never tried before. Learnt something today! Thanks Tuxinator for posting!
Report, edit, etc...Posted by Tuxedo Templar on 2005-05-24 at 02:36:06
BeeR, unless you're talking about having the wait action timed to exactly when the unit visions are refreshed in Starcraft, you're method doesn't really work. Since I don't know the exact time between unit refreshes, I can't test that, but if someone were to know it (and assuming lag or other factors won't affect the timings), that could cut down on having to create remove constantly, possibly shaving a little bit off the latency load for multiplayer.

Anyway, here's the test map I made to try out different wait times between vision creates (0 time -> 3/4 second). It'll show you what I mean about the small 1 frame glitch that makes cloaked buildings flicker visable on the fog for that 1 frame moment:
Next Page (1)