Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Any way to have units not be able to attack
Any way to have units not be able to attack
Jul 28 2008, 7:35 am
By: Madroc
Pages: < 1 2 3 4 >
 

Aug 1 2008, 9:30 am Madroc Post #41



Thanks, and yes I forgot to mention that they need to be attackable.

The problem with giving all civs to player 12 is how am I going to tell which civs belong to which players if they are becoming p12s? The civs need to be given back. Also, if any of them happen to be killed, the player owning them (not player 12 but player 1,or 2, or 3 etc) must have that death.

Edit One way of doing it would be to do this:

Player 1
Conditions: Current player brings at least one civ to location whatever
Actions Move location sheniqua onto a civ at location whatever for current player
Order 1 civ to location sheniqua for current player
Give 1 civ at location sheniqua to player 12
Preserve

Copy this 10 times. Then after copying 10 times, add this trigger:

Player 1
Conditions: Player 12 brings a civ to location whatever
Actions: Give all civ for player 12 at location whatever to current player
Preserve

Then do this again for players 2-8. This would work perfectly except for the fact that I need to do the same thing with siege tanks, vultures, and goliaths for four different locations. So that means I would have to use over 1200 different triggers for this one little hangup (nevertheless it would work just fine despite that fact). I would say "give men to player 12" instead of having seperate ones for tanks vultures goliaths and civs, but I definitely want zealots and dragoons to be able to move and attack.\

This way each cycle every possible unit is moved to its own location every trigger cycle.

Any other suggestions on how I could do this without using 1200 triggers?

Post has been edited 1 time(s), last time on Aug 1 2008, 9:43 am by madroc.



None.

Aug 1 2008, 10:00 am NudeRaider Post #42

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

The solution I presented fulfills all these requirements. I told you to make many copies of the first trigger, but not like 1200. Is it really possible, that a single player controls 1200 civs?! You can just use all players as owner. No need to make a seperate copy for each player. Also making copies of triggers is no big deal. It won't create lag nor willt you hit any limit. In ScmDraft's trigger overview just hold c key to make many copies quickly.
Every trigger will give 1 civ to P12, and order it. This must be done as many civs as there are. After all the copies have run give them all back to Current Player.
This all happens in a single loop and player by player. By using current Player you don't need to remember which player's civ you gave, you only give from Current Player.
Remember that triggers are checked player by player. That means first all of P1's civs processed, then all of P2's and so forth.

Post has been edited 1 time(s), last time on Aug 1 2008, 10:07 am by NudeRaider. Reason: more explanation




Aug 1 2008, 6:20 pm Falkoner Post #43



You can place a burrowed zergling under them, or maybe a certain number of burrowed zerglings to remember which belongs to who. Or you can remember what order you gave them away and store it in a death count, and when you give them back it will return them in the exact same order.



None.

Aug 1 2008, 6:48 pm Madroc Post #44



OK, so I tried this test:

In location 1 there are 3 firebats owned by player 1 and 2 fbats owned by player 2 (computer). They are all invincible.

I have this trigger copied like 30 times:

All players
Conds: Current player brings at least 1 men to location 1
Elapsed time is exactly 5 seconds (so at 5 seconds the test happens 8 times)
Actions: Center location "Move me" (a 1x1 location) on men owned by current player at location 1
Issue order to all men owned by current player at Move Me - move to Move Me
Give 1 men owned by current player to Neutral
Create 1 civilian for current player at "obscure location" (this is so I can count how many times it is happening)
Preserve

Then after I copy that 30 or so times i have this trigger

Players: all
Conds: Neutral brings at least 1 men to Location 1
Elapsed time is exactly 5 seconds
Actions: Give all men owned by Neutral to current player
Preserve

So during the test, after 5 seconds, 24 guys are created at Obscure location for player 1 and 16 for player 2, and the units affected are unselectable during the 5 second point. After 5 seconds, everything is owned by its normal owner. So all that is cool. But the only problem is that if I send one of the fbats moving somewhere in location 1 before the 5 second point, he still moves where he was headed to when the game is at 5 seconds. Why?!



None.

Aug 1 2008, 7:32 pm Falkoner Post #45



There's a good chance the location is centering on the wrong one, so he isn't getting ordered.



None.

Aug 1 2008, 8:05 pm Madroc Post #46



Impossible. If the player controls a unit at the location 1, the location Move Me is centered on that unit and then that unit is ordered and then given. This happens 30 times per 1/8th of a second, and given that there are only 2 or 3 units for each player there, the location is certainly centered on every unit every 1/8th of a second. Also I know that they are being given at least because you can't select the unit during the 5th second of the game.



None.

Aug 1 2008, 8:31 pm NudeRaider Post #47

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

I had problems with order when giving in the same trigger. Try switching order of give and order.




Aug 1 2008, 8:34 pm Falkoner Post #48



Which player are you giving them to? I think players 9-11 keep any orders they had previous to being given, that's the only reason Galactic Gunnerz works so well.



None.

Aug 1 2008, 8:58 pm Madroc Post #49



I am giving them to P12 or neutral as it says in the roster thingy.

After much testing, I have realized that if the "Give to neutral" is done after the "Order" in the same trigger cycle as the "Order "then the Order will not be given. CRAAAAAAAAAPPPP



None.

Aug 1 2008, 9:15 pm NudeRaider Post #50

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 Madroc
I am giving them to P12 or neutral as it says in the roster thingy.

After much testing, I have realized that if the "Give to neutral" is done after the "Order" in the same trigger cycle as the "Order "then the Order will not be given. CRAAAAAAAAAPPPP
Don't panic, just do what i said:
Quote from NudeRaider
Try switching order of give and order.





Aug 1 2008, 9:43 pm Madroc Post #51



Got it!! Yes!!!! Woot!

Here is my trigger:
Players: all
Conds:All Players bring at least 1 Zealot (the bullet) to location Anywhere
Current Player brings at least 0 Cantina to Anywhere (is this necessary to make it recognize that current player is not the one owning the Zealot?)
Actions: 1 Center Location "Stay Still" on Zealot pwned by all players at location Anywhere
2 Give all Vulture pwned by current player to Neutral
3 Give all Siege Tank pwned by current player to Neutral
4 Give all Ghost owned by current player to neutral
5 Give all Golitah owned by current player to neutral
Preserve Trigger
6 Center Location labed "Move Me" on men owned by neutral at "Stay Still"
7 Give 1 men owned by neutral at Move Me to Current Player
8 Order all men owned by current player at Move Me - Move to Move Me
Copy 6 7 and 8 until all 64 actions are used up.

This way even if one player has 18 or less guys at that location, none of them will run away or even be able to move as long as that zealot is still there (the zealot disappears after 1 second)

Then I copy this trigger for all the other kinds of bullets besides zealot (there are 6). That way instead of having to have 1200 triggers, I can just have 6 triggers. Woopie. Edit actually its more like 48 triggers because what if 2 players have a zealot at the same time... Still good tho.

Thx for the help guys. I do believe this is the ---only--- (edit best) way to do this without using an insane amount of triggers... And that pretty much solves my problem!

Post has been edited 2 time(s), last time on Aug 1 2008, 10:26 pm by madroc.



None.

Aug 18 2008, 11:16 pm Madroc Post #52



Sorry to necro this thread, but it is for good reason - The solution that I received from this thread (see the post right above this) is bad. For some reason the Bullet that is created and destroyed after like 20 trigger cycles does not attack. Before I incorporated the trigger they did attack. I would bet real money that the reason is because locations are being constantly centered on him and that is the problem.

Can anyone else think of a good solution?



None.

Aug 19 2008, 1:00 pm NudeRaider Post #53

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

It's simple: You order the zeal to move all the time. Stop the ordering after 20 cycles and it will attack.




Aug 19 2008, 6:58 pm Madroc Post #54



I don't understand. The 20 cycles is the time it takes for the zeal to attack and then it is removed after 20.



None.

Aug 19 2008, 7:33 pm NudeRaider Post #55

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

duh then stop the ordering whenever you want him to attack.
alternatively you can use attack order, but spamming the order will also stop him from attacking.
Just dont do it every trigger loop




Aug 19 2008, 10:40 pm Madroc Post #56



Quote from NudeRaider
duh then stop the ordering whenever you want him to attack.
alternatively you can use attack order, but spamming the order will also stop him from attacking.
Just dont do it every trigger loop

I tried your second solution and it failed but based on your first solution I think you might be a little confused.

Let me explain the gist:
All units in the map are invincible. You position your ghost and crosshair (which is an observer), then press a button, then a scourge is created at the ghost which flies over to the observer. When it gets there, a zealot is created, invincibility for units in a small location around it is disabled, the small location is moved elsewhere to conserve locations, and a death count of 12 is created so that the zealot has enough time to move a little tiny bit (so that error isn't quite so frustrating for the player) AND attack once. Then after the 12 death counts are gone, the small location moves BACK to the zealot and then the zealot is removed and invincibility is restored for units at the location.

The problem is that guys in the area that are not invincible are getting attacked by people that are out of the invincibility area and thus they are running away. I want to stop that from happening. So I figured out that this would work: Every trigger cycle move the small location onto the zealot and give all units for player 1 to player 12 and make them move towards themselves and give them back to player 1, cycling through all of Player one's units. Then repeat for players 2-8. Then the small location might move elsewhere to do the exact same thing with another player's zealot if there happen to be 2 at the same time in the map.

So this worked great, none of the units there could move at all except for the zealot. The problem is that the zealot was NOT attacking like it did before I incorporated this system! I'd bet that this was because the small location is constantly being centered onto him the entire time he exists and thus his time runs out without him ever attacking or even moving. I tried to have him attack towards himself after he was created but no change happened. Then I tried to have him attack towards the middle, and he just ran towards the middle without attacking anything at all. Then I tried to select him and right click on the siege tank. THAT WORKED. But obviously I wouldn't expect the people in the map to do that....

Understand now? Or or is it ME who did not understand you after all?

Thanks alot! :)



None.

Aug 21 2008, 1:18 am NudeRaider Post #57

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

To make a long story short your zeal ignores the vincible P12 units but you can manually attack them.
Well first thing that comes to mind is alliances. Have you unallied the zeal player to the units (e.g. tank)?
Only centering locations on units does not do anything so that's not the problem.

But why the complicated cycling system in the first place? Wouldn't it be easier to ally the players of the units that are near the zeal?




Aug 21 2008, 1:25 am Madroc Post #58



ohhhh, I see.
The answer to your first question is yes, they are unallied from the start (is that what you mean?)
One of my tests must have been screwy, i guess you're right that couldn't be the problem.

The reason i can't do this is because what if both of those players fired bullets at the same time? (this will happen often enough to care, methinks.)


Thanks for your interest.
So how can I cure my map?



None.

Aug 21 2008, 9:20 am NudeRaider Post #59

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

One thing: Maybe the zeal is not in range? And I'm not sure about attack order, often enough it works as a move order. Try patrol.

From what you said (if you really order, not move the victims) I have no idea what else could be wrong.
I suggest you save the map under a different name and run a few tests: Simplify the system more and more to pinpoint which part of the triggers stops the attack.




Aug 22 2008, 6:53 am Madroc Post #60



Arg. :flamer: I figured out what's wrong. The trigger is under all players. What I'm doing is centering a 3x3 location on the zealot and I give all the units at the location owned by Current player (except for any bullets) to p12 and then 1. center a 1x1 pixel location on men owned by p12 at the location 2. Give that man to current player 3. Order that man to move to its current location. Then I repeat steps 1-3 20 times and add a preserve trigger.

So it does this 8 times, once for each player since it's under "All Players."

So what it's doing is it's centering the location on nothing (the middle of the 3x3) and my zealot happens to be right there since i center the 3x3 on him at the beginning of the trigger. So he is constantly moving towards himself. :flamer:

Funny how half of the problems presented in the UMS assistance are unsolvable except by the person posting the problem. :lol:

Thanks for the help, I'll get right on fixing it. I definitely wouldn't have had the motivation to look that far without u guys. THx! :D



None.

Options
Pages: < 1 2 3 4 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[01: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.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
Please log in to shout.


Members Online: lil-Inferno, Roy