I tried something like this too. but the result is about the same.
I click one and it might work. but if I then click another button it start messing everything up.
Zergx 2
Events
UI - Player 1 presses Mutate into Hive
Local Variables
Conditions
Unit[0] == 1
Actions
Unit - Hide the Starport - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Factory - Train (Factory) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Gateway - Train (Gateway) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Robotics Facility - Train (Robotics Facility) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Stargate - Train (Stargate) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Barracks - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Larva - Morph Unit (Larva -> Basic) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Hatchery - Train Queen ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Corruptor - Morph (Corruptor - > Brood Lord) ability for 8WAY Warp Point [44.00, 14.00]
I have a problem with my button switching trigger. It works sorta. But when I click terran command center, then nexus it will mess up the screen and sometimes even remove everything except the 3 switching buttons. I'm not sure what is wrong.
Zergx
Events
UI - Player 1 presses Mutate into Hive
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Zerg[1] == true
Then
Unit - Show the Larva - Morph Unit (Larva -> Basic) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Corruptor - Morph (Corruptor - > Brood Lord) ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Zerg[1] = false
Else
Unit - Hide the Starport - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Factory - Train (Factory) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Gateway - Train (Gateway) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Robotics Facility - Train (Robotics Facility) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Stargate - Train (Stargate) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Barracks - Train ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Zerg[1] = true
Terranx
Events
UI - Player 1 presses Build Command Center
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Terran[1] == true
Then
Unit - Show the Starport - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Factory - Train (Factory) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Barracks - Train ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Terran[1] = false
Else
Unit - Hide the Larva - Morph Unit (Larva -> Basic) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Corruptor - Morph (Corruptor - > Brood Lord) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Gateway - Train (Gateway) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Robotics Facility - Train (Robotics Facility) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Stargate - Train (Stargate) ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Terran[1] = true
Protossx
Events
UI - Player 1 presses Warp In Nexus
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Protoss[1] == true
Then
Unit - Show the Gateway - Train (Gateway) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Robotics Facility - Train (Robotics Facility) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Stargate - Train (Stargate) ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Protoss[1] = false
Else
Unit - Hide the Larva - Morph Unit (Larva -> Basic) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Corruptor - Morph (Corruptor - > Brood Lord) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Barracks - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Starport - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Factory - Train (Factory) ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Protoss[1] = true
Hi, I'm making a map and have some problems, I hope you can help here.
I'm showing some working C code, the paths I've been taking with Galaxy Editor haven't worked so far. So won't show that unless requested.
This code will return 4, 5. because both 4 and 5 have the lowest number.
I need to convert this code to Galaxy Editor. I've tried numerous times but I fail. also the #sc2mapster people haven't been able to solve it.
Also, I need to random the result and only give me a random lowest number. and return the random number as an integer for example.
#include <stdio.h>
int main(void)
{
int LowestInteger = 100;
int PlayerArray[8] = {5,6,3,4,2,2,7,8};
int PlayerArrayCompared[8] = {0};
int PlayerArrayComparedSize = 0;
int j = 0;
int i = 0;
I hope this doesn't confuse more.. but I've been trying to figure it out.
Something like this would find the lowest number. but not if 2 numbers are the lowest. Also it wouldn't chose one of the lowest randomly.
find lowest integer, if more than one integer is lowest, pick a random of the lowest, and set playerY = player with lowest integer. (in this case int1 and int4 are lowest and I randomly want to chose one)
do attack playerY location "or region, point, either of these would work"
after playerY is dead repeat the above and find a new suitable target to attack.
I want this to happen untill all players are eliminated.
trying to make my first SC2 map, but I'm having issues :). Been trying for 6 hours now but a few things are not working. I'll start with my main problem.
Integers increase in value on events.
1) I'm trying to order units to attack the player with the lowest integer number.
2) After the first event is completed, I want it to look at the integers again, then attack that number.
0
I tried something like this too. but the result is about the same.
I click one and it might work. but if I then click another button it start messing everything up.
Zergx 2
Events
UI - Player 1 presses Mutate into Hive
Local Variables
Conditions
Unit[0] == 1
Actions
Unit - Hide the Starport - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Factory - Train (Factory) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Gateway - Train (Gateway) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Robotics Facility - Train (Robotics Facility) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Stargate - Train (Stargate) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Barracks - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Larva - Morph Unit (Larva -> Basic) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Hatchery - Train Queen ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Corruptor - Morph (Corruptor - > Brood Lord) ability for 8WAY Warp Point [44.00, 14.00]
0
@theystolemynick:
Bump :)
0
Hi,
I have a problem with my button switching trigger. It works sorta. But when I click terran command center, then nexus it will mess up the screen and sometimes even remove everything except the 3 switching buttons. I'm not sure what is wrong.
Global Variables:
Zerg = false <Boolean[2]>
Protoss = false <Boolean[2]>
Terran = false <Boolean[2]>
Zergx
Events
UI - Player 1 presses Mutate into Hive
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Zerg[1] == true
Then
Unit - Show the Larva - Morph Unit (Larva -> Basic) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Corruptor - Morph (Corruptor - > Brood Lord) ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Zerg[1] = false
Else
Unit - Hide the Starport - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Factory - Train (Factory) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Gateway - Train (Gateway) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Robotics Facility - Train (Robotics Facility) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Stargate - Train (Stargate) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Barracks - Train ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Zerg[1] = true
Terranx
Events
UI - Player 1 presses Build Command Center
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Terran[1] == true
Then
Unit - Show the Starport - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Factory - Train (Factory) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Barracks - Train ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Terran[1] = false
Else
Unit - Hide the Larva - Morph Unit (Larva -> Basic) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Corruptor - Morph (Corruptor - > Brood Lord) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Gateway - Train (Gateway) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Robotics Facility - Train (Robotics Facility) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Stargate - Train (Stargate) ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Terran[1] = true
Protossx
Events
UI - Player 1 presses Warp In Nexus
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Protoss[1] == true
Then
Unit - Show the Gateway - Train (Gateway) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Robotics Facility - Train (Robotics Facility) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Show the Stargate - Train (Stargate) ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Protoss[1] = false
Else
Unit - Hide the Larva - Morph Unit (Larva -> Basic) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Corruptor - Morph (Corruptor - > Brood Lord) ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Barracks - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Starport - Train ability for 8WAY Warp Point [44.00, 14.00]
Unit - Hide the Factory - Train (Factory) ability for 8WAY Warp Point [44.00, 14.00]
Variable - Set Protoss[1] = true
0
@Berrala:
Someone from #sc2mapster solved it an hour ago :). thanks alot for the help.
And I can't seem to get anything working in this editor. :).
0
Hi, I'm making a map and have some problems, I hope you can help here.
I'm showing some working C code, the paths I've been taking with Galaxy Editor haven't worked so far. So won't show that unless requested.
This code will return 4, 5. because both 4 and 5 have the lowest number.
I need to convert this code to Galaxy Editor. I've tried numerous times but I fail. also the #sc2mapster people haven't been able to solve it.
Also, I need to random the result and only give me a random lowest number. and return the random number as an integer for example.
#include <stdio.h>
int main(void)
{
int LowestInteger = 100;
int PlayerArray[8] = {5,6,3,4,2,2,7,8};
int PlayerArrayCompared[8] = {0};
int PlayerArrayComparedSize = 0;
int j = 0;
int i = 0;
while(i < 8) {
if(PlayerArray[i] < LowestInteger) {
LowestInteger = PlayerArray[i];
}
i += 1;
}
while(j < 8) {
if(PlayerArray[j] == LowestInteger) {
PlayerArrayCompared[PlayerArrayComparedSize] = j;
PlayerArrayComparedSize++;
}
j += 1;
}
for(i = 0; i < PlayerArrayComparedSize; ++i) printf("%d\n", PlayerArrayCompared[i]);
return 0;
}
0
Thanks loads :). I'll be sure to add a thanks to all that helped me with this on my first map :).
0
I got the lowest thing figured out. Now I need to return the array index.
arr[0] 2
arr[1] 4
arr[2] 3
If I want to return arr[3]
0
Thanks, thats real pretty.
Now, how do I return an array index "or indices". So I can match the lowest up against it ?.
0
@RileyStarcraft:
the minl function only supports 2 values.
Anyone got any ideas on how to do this ?
0
@wOlfLisK
I hope this doesn't confuse more.. but I've been trying to figure it out.
Something like this would find the lowest number. but not if 2 numbers are the lowest. Also it wouldn't chose one of the lowest randomly.
X = 0
lowestint1 = 0
lowestint2 = 0
lowestint3 = 0
lowestint4 = 0
lowestint5 = 0
int1 = 0
int2 = 1
Int3 = 2
Int4 = 0
Int5 = 3
if (int1 < int2 && int1 < int3 && int1 < int4 && int1 < int5) lowestint1 = 1
else lowestint1 = 0
endif
if (int2 < int1 && int2 < int3 && int2 < int4 && int2 < int5) lowestint2 = 1
else lowestint2 = 0
endif
if (int3 < int1 && int3 < int2 && int3 < int4 && int3 < int5) lowestint3 = 1
else lowestint3 = 0
endif
if (int4 < int1 && int4 < int3 && int4 < int2 && int4 < int5) lowestint4 = 1
else lowestint4 = 0
endif
if (int5 < int1 && int5 < int3 && int5 < int4 && int5 < int2) lowestint5 = 1
else lowestint5 = 0
endif
if (lowestint1 = 1 && lowerstint2 = 0 && lowerstint3 = 0 && lowerstint4 = 0 && lowerstint5 = 0) X = 1
if (lowestint2 = 1 && lowerstint1 = 0 && lowerstint3 = 0 && lowerstint4 = 0 && lowerstint5 = 0) X = 2
if (lowestint3 = 1 && lowerstint2 = 0 && lowerstint1 = 0 && lowerstint4 = 0 && lowerstint5 = 0) X = 3
if (lowestint4 = 1 && lowerstint2 = 0 && lowerstint3 = 0 && lowerstint1 = 0 && lowerstint5 = 0) X = 4
if (lowestint5 = 1 && lowerstint2 = 0 && lowerstint3 = 0 && lowerstint4 = 0 && lowerstint1 = 0) X = 5
0
@wOlfLisK
Hi, thanks for replying.
What I need is something like this:
int1 = 0
int2 = 3
int3 = 2
int4 = 0
int5 = 1
find lowest integer, if more than one integer is lowest, pick a random of the lowest, and set playerY = player with lowest integer. (in this case int1 and int4 are lowest and I randomly want to chose one)
do attack playerY location "or region, point, either of these would work"
after playerY is dead repeat the above and find a new suitable target to attack.
I want this to happen untill all players are eliminated.
0
Hi,
trying to make my first SC2 map, but I'm having issues :). Been trying for 6 hours now but a few things are not working. I'll start with my main problem. Integers increase in value on events.
1) I'm trying to order units to attack the player with the lowest integer number.
2) After the first event is completed, I want it to look at the integers again, then attack that number.
Hope you can help me guys.