Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Strategic Suicide Script Problem
Strategic Suicide Script Problem
Feb 18 2009, 2:48 am
By: Expopower  

Feb 18 2009, 2:48 am Expopower Post #1



Wow, I've been posting this on every site I could find (Whew, I must've joined at least 3 more sites in the past day or two...)

On the Starcraft Map Editor, I set the a few triggers as follows:

------------------------------------------

1. Condition: Always.

Action: Send all units on strategic suicide missions.

Preserve trigger.

2. Condition: Elapsed game time is at least 30 game seconds.

Action: Create "#" "unit" at "Location".

3. Condition: Elapsed game time is at least 90 game seconds.

Action: Create "#" "unit" at "Location".

Triggers #1 and #2 work, but when the trigger #3 is activated, the units are created at "Location", but they are unaffected by the trigger #1. No matter what triggers I use, any units created after trigger #2 is already activated are not affected by trigger #1. All they do is appear and remain stationary.

I've already tried this order:

Trigger #1

Trigger #2

Trigger #1

Trigger #3

Trigger #1

Trigger #4

Trigger #1

Etc...

------------------------------------------

Still the same results as my first attempt.

------------------------------------------

I've also tried:

1. Condition: "Player" commands at most "#" "units".

Action: Create "#" "unit" at "Location".

Send all units on strategic suicide missions.

Preserve trigger.

------------------------------------------

This also does NOT work.

Help me out, please?



None.

Feb 18 2009, 4:28 am Falkoner Post #2



When you create the unit, give all units owned by that player to another player, wait, give them back, then run the AI again.



None.

Feb 18 2009, 12:22 pm NudeRaider Post #3

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

Yeah, running an AI over and over can screw things up. What Falk explains kinda resets all AIs for that player.
As an alternative you can completely delete trigger #1 and add the AI action to the create units triggers #2 and #3.

Oh and welcome to SEN. You should be able to find all answers to your mapping questions here. ;)
(And a nice community, too)




Feb 18 2009, 11:26 pm Expopower Post #4



Yay! Thanks for these great replies! (And the warm welcome too...) I haven't gotten it to work yet...but this has given me another idea! By the way, I'm using Starcraft X-tra Editor Version 2.6. Does that version have any outstanding glitches?



None.

Feb 18 2009, 11:35 pm Morphling Post #5



Quote from NudeRaider
(And a nice community, too)
Well, for the most part. :D
Quote from Expopower
Yay! Thanks for these great replies! (And the warm welcome too...) I haven't gotten it to work yet...but this has given me another idea! By the way, I'm using Starcraft X-tra Editor Version 2.6. Does that version have any outstanding glitches?
Here is Scmdraft 2. It is a much better editor. It can do everything that X-tra editor can and much, much more. Almost everyone uses it. C'mon. Everyone's trying it. ^^
Edit: Thanks for changing my link Nude. I thought the dldb had the updated version.

Post has been edited 2 time(s), last time on Feb 18 2009, 11:51 pm by Morphling.



None.

Feb 19 2009, 2:05 am Falkoner Post #6



Oh, I forgot that I had my weird version specially made by SI uploaded to there, I can't get the new one up because of the file size limits on the DLDB now.



None.

Feb 20 2009, 4:14 am Expopower Post #7



Urgh...I tried interrupting the triggers by inserting "Wait 100 milliseconds" in certain places...

...but it didn't work...

Essentially, I have the following non-working trigger:

1. Conditions: Elapsed game time is 30 seconds.
Player1 owns at most 8 "units".

Actions: Create 50 "units" at Location1.
Create 50 "units" at Location2.
Create 50 "units" at Location3.
Create 50 "units" at Location4.
Give all "units" at Location1 to Player2.
Give all "units" at Location2 to Player2.
Give all "units" at Location3 to Player2.
Give all "units" at Location4 to Player2.
Wait 100 milliseconds.
Give all "units" at Anywhere owned by Player2 to Player1.
Execute Send All Units on Strategic Suicide Missions.
Wait 100 milliseconds.

-----------------------------------------------------------------------------------

Now, this works. Once. Only once. No matter what. (Like before....)

When a create another trigger identical to this one (except that it activates later,) the units are created at Locations 1 through 4, and they are given backand forth between the Players. HOWEVER: That's where it stops. The units remain in "Stop" mode, and hold their positions without going on "strategic suicide missions". Are there any errors in the trigger that I posted?

Help, please?

Edit: Fixed an interesting typo...

Edit2: Oh yeah, if I have combat units mixed with neutral units, and they're supposed to be attacked indiscriminately, is there any script other than "Send All Units on Strategic Suicide Missions" that causes the attackers to attack the first thing they see, instead of only attacking the units that fire on them? (Because when I went with a run-through, the neautral units were completely undamaged, even though they were set to "Enemy" status, while the combat units were completely ripped apart.

Post has been edited 1 time(s), last time on Feb 20 2009, 4:23 am by Expopower.



None.

Feb 20 2009, 4:22 am Keirebu Post #8



I have found that using "Random Suicide missions" Instead works perfectly, without all that extra trouble. o.o



None.

Feb 20 2009, 4:24 am Expopower Post #9



Mm...When I ran "Send All Units on Random Suicide Missions"...3/4 of the enemy units froze up and didn't even respond to active attacks on them...

...urgh...



None.

Feb 20 2009, 5:27 am Keirebu Post #10



Quote from Expopower
Mm...When I ran "Send All Units on Random Suicide Missions"...3/4 of the enemy units froze up and didn't even respond to active attacks on them...

...urgh...
Well, When I was working on my Pylon Defense map, I tried using "Send All Units on Strat Suicide Missions" And They would start going, And then just stop after a few seconds, But when I did The Random Version, It was all fine, and they did exactly what I wanted, Can you share the map? And what your trying to do with it, Maybe I or someone else here can see what exactly is happening o.o.



None.

Feb 20 2009, 5:36 am MobiusOne. Post #11



I laugh at you Exopower..
You forgot preserve trigger!
Ha.. Ha.. Ha. :lol:



None.

Feb 20 2009, 4:20 pm Falkoner Post #12



Your first trigger caused you wait blocks, you might need to use Death Counts instead of waits.



None.

Feb 21 2009, 4:07 pm Expopower Post #13



Uh...okay...

(And the reason I didn't put in "Preserve Trigger" was not due to carelessness...it was because I was going to copy copy copy copy copy this trigger for every moment I wanted it active.)

Anyways, I tried to use the Death Count function. Here are my current triggers:

1. Conditions: Player1 has suffered at most 1 death of "unit".

Actions: Set Player1 death count to 0 deaths of "units".
Preserve Trigger.

2. Conditions: Elapsed game time is at least 30 game seconds.
Player1 controls at most 8 "units".
Player1 has suffered at most 0 deaths of "units".

Actions: Create "#" "unit" at "Location1".
Create "#" "unit" at "Location2".
Create "#" "unit" at "Location3".
Create "#" "unit" at "Location4".
Give all units owned by Player1 at Anywhere to Player2.
Give all units owned by Player2 at Anywhere to Player1.
Execute "Send All Units on Strategic Suicide Missions".
Set Player1 death count to 1 death of "unit".
Preserve Trigger.

-----------------------------------------------------------

As you can imagine, this still does not work. I am repeatedly experiencing the same problem outlined in my previous several posts...Any suggestions on how I can change my current triggers so that what I'm aiming for will work?

Thanks!



None.

Feb 21 2009, 5:01 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

Alright, I will try to make triggers for you. The following assumes that you want to create units every 30 seconds and that you don't use hyper triggers.

First pick a computer player that runs the triggers. If you would give it to a human player, this player could leave and the create unit trigger would not run anymore.
You will see that I used <Computer Player> as owner of Trigger 1 and 2, and <Whoever gets the units> as owner of Trigger 3. Those CAN (but don't necessarily have to) be the same player!

Then pick an unused unit (for example neutral - neutral - cantina) and rename it to 'spawn counter'.

Trigger 1: Init (sets the death counter to 15 = 30s on map start)
<Computer Player>
Conditions:

Always
Actions:
Set deaths of 'spawn counter' to 15 for Current Player

Trigger 2: Counter (counts down by always subtracting 1; 15 loops = 30 seconds have passed)
<Computer Player>
Conditions:

Always
Actions:
Subtract 1 deaths of 'spawn counter' for Current Player
Preserve trigger

Trigger 3: Spawn (Resets the death counter timer, resets the AI and creates the units)
<Whoever gets the units>
Conditions:

<Computer Player> has suffered at most 0 deaths of 'spawn counter'
Actions:
Set deaths of 'spawn counter' to 15 for <Computer Player>
Give all units owned by Current Player at Anywhere to Player11.
Wait(5000) *)
Give all units owned by Player11 at Anywhere to Current Player.
Create "#" "unit" at "Location1" for Current Player.
Create "#" "unit" at "Location2" for Current Player.
Create "#" "unit" at "Location3" for Current Player.
Create "#" "unit" at "Location4" for Current Player.
Execute "Send All Units on Strategic Suicide Missions".
Preserve Trigger.

*) I am not sure how long you actually have to wait, but 5 seconds are most probably enough to reset the AI. When it works you can lower the value to 1000ms and then to 100ms and check if it still works.
Keep in mind that a player must not execute 2 or more waits at a time or you run into wait blocks. This can be avoided using death count timers, but for the sake of simplicity I used a wait.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:41 am]
Ultraviolet -- 🤔 so inf is in you?
[04:57 am]
O)FaRTy1billion[MM] -- my name is mud
[04:35 am]
Ultraviolet -- mud, meet my friend, the stick
[10:07 pm]
lil-Inferno -- nah
[08:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[05:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[05:24 pm]
lil-Inferno -- poopoo
[05:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[03:36 pm]
NudeRaider -- :lol:
[2024-5-16. : 3:02 am]
Ultraviolet -- I'm gonna send inf to have sex with their moms
Please log in to shout.


Members Online: Ultraviolet, 5sophiee58100yp3, 6adrianc4923fc3