Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Detect Cloaking | Sounds | Trigger Irradiate
Detect Cloaking | Sounds | Trigger Irradiate
Sep 21 2009, 9:46 am
By: DavidJCobb  

Sep 21 2009, 9:46 am DavidJCobb Post #1



Uh, so I guess this is my first post here. Been browsing this site for a few days, and it's been really helpful. Lemme say this right off the bat: you are all awesome, as is your wiki and website. You've saved me a ton of time. Thank you.


So anyway, I have a few questions. First of all, I need to figure out how to write a trigger that detects if a unit is cloaking or decloaking in a location. That is, I don't need to know if a unit is cloaked in a location, I need to know if they are (de)cloaking.



Second of all, I don't have any speakers, so I can't use SCMDraft2 to get this on my own... If anyone happens to know the filenames (and paths, if necessary) for the Dropship loading and unloading sounds, I would greatly appreciate it if you could tell me. (I did Google this, couldn't find anything.)



Third of all, I'm gonna run a test later (in a few hours) when I get the chance, but I may as well ask now. How does one cast Irradiate on a unit using a trigger? I was thinking about having this setup, where P1 owns the target unit, and that unit is biological. P2 and P3 are dummy players; they are enemies of each other, and P2 is an enemy of P1.

1. Spawn an Arbiter and Science Vessel owned by P2. Spawn both near the target unit.

2. Spawn a Goliath owned by P3 (and cloak it too, if possible). Figure out how to make the Goliath attack the Science Vessel. (Perhaps I can have P3 turn on shared vision for P2?)

3. The SciVessel will then cast Irradiate on the nearest enemy biological unit. The Goliath is mechanical and is thus exempted (and it's cloaked anyway). P1's unit is all that remains.

4. Figure out some way to detect the irradiation and remove the P2 and P3 units.

5. ???

6. PROFIT!

Assuming that approach is correct, the main thing I need help with is #4 in that sequence.



None.

Sep 21 2009, 2:37 pm rockz Post #2

ᴄʜᴇᴇsᴇ ɪᴛ!

To detect changes in cloaking status, you have to first detect cloaking status, then detect the change. To detect cloak, I think the best way is using the ai script "strategic suicide mission" and have 4 wraiths in each corner. When the wraiths move, the unit is uncloaked. When they don't move, the unit is cloaked. Of course, this only works in single player, or 1 computer per person. Your best bet would be to figure out a better way of doing what you're trying to do.

sound/misc/tdrtra00.wav
sound/misc/tdrtra01.wav

Irradiate is finicky. You'll have to test it out. I'd use a faster attacking unit like archon. The wiki has more on how computers use this, but you've already looked at that. Make sure to update it with your findings.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Sep 21 2009, 6:56 pm DavidJCobb Post #3



Thanks for the help :D



None.

Sep 21 2009, 11:39 pm Roy Post #4

An artist's depiction of an Extended Unit Death

If you want to approach the decloaking detection through EUDs, there's an address for each unit (or at least ghosts; didn't test other units) where the value (1-byte) is 1 if the unit is cloaked, and 0 if it is not. If that didn't make any sense to you, ignore this post.




Sep 22 2009, 12:09 am rockz Post #5

ᴄʜᴇᴇsᴇ ɪᴛ!

it's part of +0xDC - DWORD dwStatus. It will be kind of hard to detect, since it's a BIT, not a byte.

Code
    00000001(0x1) - Is Completed
    00000010(0x2) - Is on ground? or is it is unit...
    00000100(0x4) - Is in air
    00001000(0x8) - Checked for disabled, if it is 00001000, then the unit is disabled(/unpowered?)
    00010000(0x10) - Checked for burrowing purposes, if it is 00010000, then the unit is burrowed
    00100000(0x20) - Unit is entering a building
    01000000(0x40) - unit is entering a transport
    10000000(0x80) -
   
    00000001(0x100) - Checked for invisible purposes, if it is 00000001, then the unit requires a detector?
    00000010(0x200) - checked for cloak?
    00000100(0x400) - deals with doodad states? if set, is disabled
    00001000(0x800) - Unit cloaking doesn't need energy decrease
    00010000(0x1000) - Unit is in unbreakable code section? Cannot receive orders
    00100000(0x2000) - Set by nobrkcodestart
    01000000(0x4000) -
    10000000(0x8000) - cannot attack if set

    00000001(0x10000)
    00000010(0x20000) - Is a Building?

    00000100(0x4000000) - Invincible

    00010000(0x10000000) - Speed upgrade
    00100000(0x20000000) - cooldown upgrade




"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Sep 22 2009, 1:06 am DavidJCobb Post #6



I know the basics of EUDs (if players/triggers/locations/units/anything-with-a-number-or-ID is like an array, then an EUD is like deliberately going out of bounds, right?), but I also happen to know that they can make some maps glitchy or unplayable on Macs (different memory addresses). And in any case, the effect I wanted isn't worth the trouble.

I'm doing a guerrilla-type map -- play as a small group of units, sneaking around through a massive enemy encampment; I'm sure it's been done before, but meh. I thought it'd be neat to have it so that if one of your guys cloaked or decloaked right in front of an enemy soldier, the soldier would notice and react accordingly (maybe pulling an alarm, or calling for backup, or something).

As for the Irradiate thing, that was going to be used in an area after the player dropped a nuke somewhere... I suppose I could also try the Scarab-based Direct Damage System for that. That'd probably be simpler, if I set it up right.

Thanks for the help, guys :D

Oh, and I think 0x100 and 0x200 represent unit vision and player vision of a unit. I once did Create Unit with Properties to spawn a cloaked Zergling. The 'ling was visible, but attempting to attack it would yield a "Cannot target unit" error, implying that it was "in-between" cloaked and uncloaked (0x100 true, but 0x200 false?).



None.

Sep 22 2009, 2:48 am SelfPossessed Post #7



Options for Irradiation:
  • If you want an area to be continually irradiated, you can use irradiated scourges. Just time it with death counts for when to replace the irradiated scourges with new ones.
  • If you want a unit to itself be irradiated, you can have irradiated scourges following it provided that the unit is unique (scourge can follow it).
  • If you want a unit itself to be irradiated but you don't want the scourge following it, you can move it to another location to get irradiated and moved back afterwards.

Prerequisites to Irradiate a Unit in an Isolated Location:
  • Have a Zerg Cocoon set to 0/1 hp
  • Have a Raszagal Hero Corsair near it continually attacking the Cocoon
  • When you want to get something irradiated (scourge or otherwise), spawn the following near the Cocoon:
    • Science Vessel (not hero version, with enough energy and irrad researched) owned by a CPU that does not own the Raszagal
    • The unit you want irradiated owned by an enemy of that CPU
    • 1hp Civilians surrounding the unit to be irradiated owned by that CPU

What Happens:
  • The Science Vessel will come under attack by the splash damage of the Raszagal and look to irradiate something.
  • The Science Vessel will irradiate the unit you want (it's the only one close enough to irradiate)
  • When the unit is irradiated, the nearby Civilians will instantly die due to splash
  • After detecting that the Civilian count has changed, remove remaining civilians and the Science Vessel
  • Move the irradiated unit to wherever you want

Things to Keep in Mind:
  • The isolated location must be ISOLATED, as in nothing can interfere with it by accident
  • This is based on default AI, no AI scripts needed
  • Other default AI stuff CAN INTERFERE with this, such as lockdown casts, defense matrix casts, etc. Use other computers for other AI effects as needed


Here's a screenshot of a mass irradiated scourge spell demo. There were I believe 40ish irradiated scourges (the damage stacks!). You casted it with dark swarm and subsequent casts moved the entire irradiated ball around.



None.

Sep 22 2009, 3:29 am rockz Post #8

ᴄʜᴇᴇsᴇ ɪᴛ!

Excellent description. I updated the wiki too. Can you upload and link that map in the wiki?



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Sep 23 2009, 2:00 am DavidJCobb Post #9



Bookmarked, and I plan on crashing Firefox with TaskMan so I can view this the moment I log back on tomorrow (via Session Restore). Thank you!



None.

Sep 23 2009, 3:44 am SelfPossessed Post #10



Unfortunately, the map is not a standalone spell test; it's an unfinished spell demo for several characters. As in, it would NOT be useful for the wiki at all. There's too many steps to get it operational. However, if you wanted to try it out for yourself...

How to Play the Demo:
  • Download the attachment from http://www.staredit.net/topic/5138/
  • Open up Starcraft and go to LAN or Bnet.
  • Open the file (called demorpg42.scx) and move yourself to the THIRD PLAYER SLOT (the force is called Warlock). PLAY THIS ALONE.
  • When the game starts, scroll up a tiny bit and build workers for gas, which is your mana. I forget if it was probes or scvs that you had to build.
  • After getting a decent amount of gas, scroll to the top left of the map where there are units arranged in a pentagon formation.
  • Click on the unit called Irradiate or Death and Decay (I forget what I last called it). I think it's the Scourge unit, but I could be wrong.
  • Order it to move somewhere.
  • Go to your Defiler unit and cast Dark Swarm. Irradiated Scourges should begin to appear. Once 44 or so Scourges have been achieved, casting again moves the irradiate blob. If your defiler moves during the spell, the spell is cancelled. You may want to waypoint the HOLD command to prevent accidental cancels. Note that minerals represent its duration. Moving different units top left changes the spell that Dark Swarm is set to.

As you can see, there are a ton of steps to get to the spell, so it isn't useful for the wiki. Also keep in mind that I haven't worked on this for a while. I had planned on removing mana completely from the game as well as redoing P1's core concept and several of P2's spells. P3 (the warlock) is close to complete though.



None.

Sep 23 2009, 10:22 pm DavidJCobb Post #11



I just whipped up a demo map, showing Irradiation in a fixed spot for 4 seconds. Map is attached.

A few things that tripped me up:
  • The computers have to be explicitly set to be enemies of each other. I'm fairly certain that they're supposed to be enemies by default, but evidently they require either an AI or an explicit enemy status to attack each other.
  • The Science Vessel would occasionally leave the Irradiation Area. I fixed this with two bound locations and triggers that order it back.
  • Occasionally, the Scourge would wander a bit when spawned, get too close to the Cocoon, and die from splash damage. I prevent this by using a trigger to set the Scourge's HP to 99% whenever it's at the spawn location.
  • The Scourge wanders when Irradiated. Simple fix: constantly order it to go to a location, to anchor it in place.

Implementation-specific details:
  • I set this up using P7 and P8; I also did Complex Hyper Triggers with them.
  • I used a trigger to prevent Raszagal, the Cocoon, the pre-Irradiated Scourge, and the SciVessel from dying.
  • On my map, the process is started by setting the "Irradiate();" switch, hence its JavaScript-function-call-like name.
  • I use a death count (P1 Cantina) to have the Irradiated Scourge expire in 4 seconds (after relocation).
  • In addition to making the Scourge invulnerable prior to moving it, I also make it Cloaked. I may have an old version of SC (how do I tell?), but on my PC at least, this means that the Scourge is still visible, but cannot be targeted. (Right-clicking it will yield an error that you cannot attack it, and the selected unit will just walk up to it.)
  • If you alter the map to set the "Debug output is on" switch, you'll see debug output in the form of the custom scoreboard. P1's score denotes the Irradiated Scourge's "elapsed time", with trigger cycles as a measurement unit. P2's score shows the status of the "Irradiate();" trigger. Debug output is handled using the triggers that are enabled for Player 2.
  • I stashed additional details (along with an explanation of the trick) in a few trigger comments (long ones!) for Player 11.


Attachments:
Trigger Irradiate.scm
Hits: 3 Size: 44.44kb



None.

Sep 24 2009, 4:01 am SelfPossessed Post #12



You should remove and recreate the Science Vessel each time if you want to reuse the area for Irradiates. Irradiate has a built in casting cooldown time for the Science Vessel. This also prevents the Science Vessel from running out of the isolated area. There is no reason for a bound location (you have a finite amount of locations) nor the bound triggers. You only need 1 location.

The Scourge should be created at the same time the Science Vessel is and not next to the Cocoon. It should never take splash damage from the Raszagal. Play around with the position of the Cocoon/Raszagal and the order you create the Vessel/Scourge to position it properly. You can also order the Scourge to move to the center of the isolated location, which is plenty of time for it to get Irradiated. Furthermore, if you don't need the Scourge as an attack-able unit, you can set its hp to 0/1 to prevent death.

After you move the Scourge from the isolated location, then yes you need to continually order it to stay in place.

Cloaking the Scourge does crap. Irradiate reveals cloaked units. The reason why you can't attack it is because you set it to invincible (which you should anyways to prevent irradiate death).



None.

Sep 24 2009, 8:51 pm DavidJCobb Post #13



The SciVessel is removed when the irradiation is detected. It's just that sometimes, it'll try to get outta Dodge right after casting Irradiate -- and sometimes, it'll make it. I sup'pose I could try enlarging the Irradiate location and removing the bounds when I apply this in a formal map. The Scourge is created at the same time as the Science Vessel, and I do constantly order it to the center of the location, but sometimes SC's a little quirky. (I'm not sure what version I have, since I've never connected to Battle.net...) Playing around with the location may help -- I'll probably end up doing that when I try to figure out what part of the previously-mentioned formal map I'll use to set up the spell.

I thought invulnerability just made a unit... well, invulnerable. I didn't know it made it un-targetable too. Interesting.

Thanks for the method, and for the feedback on my implementation. :D



None.

Sep 25 2009, 12:45 am payne Post #14

:payne:

I just had to mention how well SelfPossessed and DavidJCobb seems to complete each other. Don't you think?
Anyways, David, for your first posts around here, you have a quality that is bigger than the one delivered by 80% of the members. Seriously, good job for that and keep rocking! We need more members like you ^^

Good luck with your thingy ;o



None.

Sep 25 2009, 1:19 am DavidJCobb Post #15



Thanks, payne :D

If anyone's wondering, my thingy is actually an entry into the map contest where you play as a villain. It's probably the most advanced map I've made so far (though I haven't done very many advanced things, admittedly).



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: lil-Inferno, C(a)HeK, Dem0n, No-Name-Needed-II