Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Detecting resource units
Detecting resource units
Apr 26 2009, 2:53 am
By: ForTheSwarm  

Apr 26 2009, 2:53 am ForTheSwarm Post #1



I have this trigger:


Code
Player 1:
Current Player Brings Exactly 0 Any Unit to P1 Inventory 1.

Set Deaths for Current Player to 1 for Yggdrasil.
Preserve Trigger.


Problem is, even when there is a mineral chunk owned by Player 1 at P1 Inventory 1, this trigger still runs. Why?



None.

Apr 26 2009, 2:56 am Zell. Post #2



I think powerups are special i was using a trigger earlier to detect any unit and it wouldn't acknowledge a psi emitter



None.

Apr 26 2009, 2:59 am ForTheSwarm Post #3



Resources CAN be detected, another trigger in my map detects them just fine.

Post has been edited 1 time(s), last time on Apr 26 2009, 3:04 am by ForTheSwarm.



None.

Apr 26 2009, 3:01 am Zell. Post #4



Well then you can assume its just that trigger and that mineral chunk, just see whats different, player of trigg, owner of chunk, etc.



None.

Apr 26 2009, 3:05 am ForTheSwarm Post #5



The only difference is that the other mineral chunk is owned by P12.
If it needs to be owned by P12 to be detected, my inventory system is screwed... :(



None.

Apr 26 2009, 3:31 am NudeRaider Post #6

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

What can go wrong:
- Wrong player. Who is Current Player?
- probably not it, but I prefer at most 0 instead of exactly 0
- also not sure, but maybe mineral junk is not [any unit]? Try the specific unit.
- Location has moved or only air checked.
- The trigger does indeed not run, but you think so because of another trigger interfering. Test that by adding a unique action, like display text.




Apr 26 2009, 12:19 pm ForTheSwarm Post #7



Quote from NudeRaider
What can go wrong:- Wrong player. Who is Current Player?
Player 1.
Quote
- probably not it, but I prefer at most 0 instead of exactly 0

I can try that. EDIT: Didn't work.
Quote
- also not sure, but maybe mineral junk is not [any unit]? Try the specific unit.
Tried that, didn't work.
Quote
- Location has moved or only air checked.
It hasn't/isn't.
Quote
- The trigger does indeed not run, but you think so because of another trigger interfering. Test that by adding a unique action, like display text.
I've already added a display text trigger, and I have confirmed that the trigger runs.

Post has been edited 1 time(s), last time on Apr 26 2009, 12:33 pm by ForTheSwarm.



None.

Apr 26 2009, 2:59 pm Falkoner Post #8



Quote
- probably not it, but I prefer at most 0 instead of exactly 0

The only difference that makes is exactly 0 detects units in bunkers, at most 0 does not.

Is it only the mineral chunk causing problems, or are other units/powerups also giving the same issue?



None.

Apr 26 2009, 3:03 pm ForTheSwarm Post #9



Quote from Falkoner
Is it only the mineral chunk causing problems, or are other units/powerups also giving the same issue?

Other resource chunks (like Gas Orbs) are giving me the same problem.



None.

Apr 26 2009, 3:10 pm Falkoner Post #10



Well, they are extended units, have you tried specifically naming them? Chances are they can't be detected.



None.

Apr 26 2009, 3:50 pm ForTheSwarm Post #11



Quote from Falkoner
Well, they are extended units, have you tried specifically naming them? Chances are they can't be detected.

I have another trigger that detects them just fine.

The trigger that works:

Code
Neutral brings at least 1 Health Potion (Mineral Chunk) to P1 Hero.

Move 1 Health Potion at P1 Hero to Storage Area.
Give 1 Health Potion at P1 Hero to Player 1.
Display for current player: <03>You pick up the health potion.
Preserve Trigger.




None.

Apr 26 2009, 3:51 pm Falkoner Post #12



Yeah, that's what I meant by specifically naming them, it looks like you can't use general functions like "All Units" on them, you have to name them specifically.



None.

Apr 26 2009, 3:54 pm ForTheSwarm Post #13



Quote from Falkoner
Yeah, that's what I meant by specifically naming them, it looks like you can't use general functions like "All Units" on them, you have to name them specifically.

It works!
But I'm screwed. That's like 8x more conditions than I need. :(
Aha! I can cycle a location through each resource chunk and create a burrowed unit under them and detect the burrowed unit. :D
Please don't tell me I can't center locations on mineral chunks... :unsure:



None.

Apr 26 2009, 4:00 pm NudeRaider Post #14

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from ForTheSwarm
Quote from NudeRaider
What can go wrong:- Wrong player. Who is Current Player?
Player 1.
I meant is current player (P1) really the player owning the mineral junk? If yes, how did you confirm it?
I like to approach such mystical bugs with "roundhouse triggers" that try to narrow the source of the problem down.
Like that:
All Players
C: All Players brings at least 1 mineral junk to anywhere
A: Display text

If it fires, narrow it down:
All Players
C: P1 brings at least 1 mineral junk to anywhere
A: Display text

etc. Until your very generic trigger matches the one not firing. You'll get to the problem along the way.




Apr 26 2009, 5:11 pm ForTheSwarm Post #15



Quote from NudeRaider
Quote from ForTheSwarm
Quote from NudeRaider
What can go wrong:- Wrong player. Who is Current Player?
Player 1.
I meant is current player (P1) really the player owning the mineral junk? If yes, how did you confirm it?
I like to approach such mystical bugs with "roundhouse triggers" that try to narrow the source of the problem down.
Like that:
All Players
C: All Players brings at least 1 mineral junk to anywhere
A: Display text

If it fires, narrow it down:
All Players
C: P1 brings at least 1 mineral junk to anywhere
A: Display text

etc. Until your very generic trigger matches the one not firing. You'll get to the problem along the way.

I know it's owned by player 1 because I was player 1 and I saw the green circle around the mineral chunk when selected. It was also bright green on the minimap.



None.

Apr 29 2009, 6:05 pm fritfrat Post #16



You can center locations on mineral chunks; I do it in my map. Center location works on almost anything, including half-built buildings. Bring just doesn't work on a lot of stuff, or in the case of mineral chunks, it is correct that it is not included in Bring any unit even though it is included in remove all any unit. Starcraft is so intuitive O.o



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[01:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
Please log in to shout.


Members Online: Roy