Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Inequality (<=>) ?
Inequality (<=>) ?
Sep 21 2007, 11:39 am
By: Obzio  

Sep 21 2007, 11:39 am Obzio Post #1



Example:
Player 1
Bring Terran Civilian > (player 2 or location 10) at location 1
Then...switch 1 is set
and
Player 1
Bring Terran Civilian = (player 2 or location 10) at location 1
Then...switch 2 is set

This my idea...can realease? :unsure:

Post has been edited 1 time(s), last time on Sep 21 2007, 11:52 am by Obzio.



None.

Sep 21 2007, 11:48 am Kenoli Post #2



I can't figure out what you're asking.



None.

Sep 21 2007, 11:56 am Obzio Post #3



it's about a Terran Civilian,but it's no matter!



None.

Sep 21 2007, 12:46 pm JaFF Post #4



Quote from Obzio
Bring Terran Civilian > (player 2 or location 10) at location 1
What does that mean? You treat Player 2 and Location 10 like boolean values. :P

Be as clear as possible.



None.

Sep 21 2007, 2:29 pm Moogle Post #5

Predator of Bed Chambers

Unless I got stupider or I have no idea what your trying to say.

Player 2 Brings a civilian to location 1, then a switch is set? ... need to make yourself more clear.



If all else fails, crowbar the fucker

Sep 21 2007, 2:47 pm frazz Post #6



If you're asking if boolean comparisons can be done in starcraft, they can't. Unless you want a certain thing.
You can use other triggers to get around this sort of thing. Also, you can't have an "or" condition. At least I don't know about one. You just have to make two triggers.

Also: Try to speak English or something, you sound kinda stupid.



None.

Sep 21 2007, 5:25 pm Aoe325 Post #7



Quote from Obzio
Example:
Player 1
Bring Terran Civilian > (player 2 or location 10) at location 1
Then...switch 1 is set
and
Player 1
Bring Terran Civilian = (player 2 or location 10) at location 1
Then...switch 2 is set

This my idea...can realease? :unsure:

Is this what you mean :
If player 1 has more civs at location 1 than player 2 has civs at location 10 then switch 1 is set

And

If player 1 has as much civs at location 1 than player 2 has civs at location 10 then switch 2 is set

If yes there are many ways to do it but we need more details to find the best way to do it
If it's not just tell us what you want textually, not using triggers



None.

Sep 21 2007, 10:38 pm Money Post #8



Kill one for each continuing until someone still has civilians and the other doesn't.



None.

Sep 21 2007, 10:58 pm Akar Post #9



Wow, didn't you guys learn your algebra.
The terms at most or at least are inequalities.
at least is (> or = to) value of unit
at most is (< or = to) value of unit



None.

Sep 22 2007, 1:45 am AntiSleep Post #10



type mismatch in pseudocode?
the problem is that he cannot explain what it is he is trying to do.

If you have two values in deathcounts, you can easily compare them using binary countoffs.

If you are trying to do what I think you are trying to do, you need to compare the number of civilians at the location, either by removing them(and maybe replacing them) using binary countoffs and the bring at least x condition, or by using a duplicated trigger, with the bring exactly x condition, to get the number of civilians in each location into a death counter, so you can compare and manipulate the numbers.

Or you can just write a trigger for every possible combination with a small command line utility(here is one written in C (you will need a C compiler, gcc is fine and free) for the p1=p2 switch set, just modify the details like location, players, and max):
Code
#include <stdio.h>

int main () {
    int x = 0;
    int MaxCiv = 20;

    for(x=0; x <= MaxCiv; x++){
        printf("\r\n\r\nTrigger(\"Player 1\"){\r\nConditions:\r\n\tBring(\"Player 1\", \"Terran Civilian\", \"Location 1\", Exactly, %i);\r\n\tBring(\"Player 2\", \"Terran Civilian\", \"Location 2\", Exactly, %i);\r\n\r\nActions:\r\n\tSet Switch(\"Switch 1\", set);\r\n\tPreserve Trigger();\r\n}\r\n\r\n//-----------------------------------------------------------------//", x, x);
    }
    return 0;
}




None.

Sep 22 2007, 3:32 am Falkoner Post #11



It's quite simple what he is asking. Basically, there is no way to do what you want in a single trigger, you just have to remake triggers for each part, since SC doesn't have an OR condition, this is very annoying to do.

Post has been edited 1 time(s), last time on Sep 22 2007, 2:55 pm by Falkoner.



None.

Sep 22 2007, 1:29 pm JaFF Post #12



If youwant it like this:
Number of P1 civilans in Location A >= Number of P2 civilans in Location B, you can do the following:

Move the civilans of P1 and P2 to one location and use the 'Command the most at' condition and move them back after the check.

Post has been edited 3 time(s), last time on Sep 22 2007, 1:41 pm by JaFF.



None.

Sep 22 2007, 2:54 pm Falkoner Post #13



An easier way is to give them each to a separate player, and the first one with no more units has less units, copy the giving trigger a few times so that it happens instantly, and then give them all back, the only problem is that whenever you do it you would lose whatever one is selected.



None.

Sep 22 2007, 4:22 pm AntiSleep Post #14



the problem with those is you cannot use them with hypers, unless you use a death count delay



None.

Sep 22 2007, 5:29 pm JaFF Post #15



Quote from AntiSleep
the problem with those is you cannot use them with hypers, unless you use a death count delay
What methods are you tlking about? Mine and Falkoner's should work with hypers perfectly.



None.

Sep 22 2007, 5:37 pm Falkoner Post #16



I was about to ask the same thing, in fact, hyper triggers would make mine work even better.



None.

Sep 22 2007, 5:43 pm Demented Shaman Post #17



Quote from AntiSleep
Or you can just write a trigger for every possible combination with a small command line utility(here is one written in C (you will need a C compiler, gcc is fine and free) for the p1=p2 switch set, just modify the details like location, players, and max):
Code
#include <stdio.h>

int main () {
    int x = 0;
    int MaxCiv = 20;

    for(x=0; x <= MaxCiv; x++){
        printf("\r\n\r\nTrigger(\"Player 1\"){\r\nConditions:\r\n\tBring(\"Player 1\", \"Terran Civilian\", \"Location 1\", Exactly, %i);\r\n\tBring(\"Player 2\", \"Terran Civilian\", \"Location 2\", Exactly, %i);\r\n\r\nActions:\r\n\tSet Switch(\"Switch 1\", set);\r\n\tPreserve Trigger();\r\n}\r\n\r\n//-----------------------------------------------------------------//", x, x);
    }
    return 0;
}
I made a trigger duplicator in VB that can be used for that too.



None.

Sep 22 2007, 6:03 pm AntiSleep Post #18



Quote from devilesk
Quote from AntiSleep
Or you can just write a trigger for every possible combination with a small command line utility(here is one written in C (you will need a C compiler, gcc is fine and free) for the p1=p2 switch set, just modify the details like location, players, and max):
Code
#include &lt;stdio.h&gt;

int main () {
    int x = 0;
    int MaxCiv = 20;

    for(x=0; x &lt;= MaxCiv; x++){
        printf("\r\n\r\nTrigger(\"Player 1\"){\r\nConditions:\r\n\tBring(\"Player 1\", \"Terran Civilian\", \"Location 1\", Exactly, %i);\r\n\tBring(\"Player 2\", \"Terran Civilian\", \"Location 2\", Exactly, %i);\r\n\r\nActions:\r\n\tSet Switch(\"Switch 1\", set);\r\n\tPreserve Trigger();\r\n}\r\n\r\n//-----------------------------------------------------------------//", x, x);
    }
    return 0;
}
I made a trigger duplicator in VB that can be used for that too.
5 bucks says mine runs faster :P



None.

Sep 22 2007, 9:42 pm Demented Shaman Post #19



Quote from AntiSleep
Quote from devilesk
Quote from AntiSleep
Or you can just write a trigger for every possible combination with a small command line utility(here is one written in C (you will need a C compiler, gcc is fine and free) for the p1=p2 switch set, just modify the details like location, players, and max):
Code
#include &lt;stdio.h&gt;

int main () {
    int x = 0;
    int MaxCiv = 20;

    for(x=0; x &lt;= MaxCiv; x++){
        printf("\r\n\r\nTrigger(\"Player 1\"){\r\nConditions:\r\n\tBring(\"Player 1\", \"Terran Civilian\", \"Location 1\", Exactly, %i);\r\n\tBring(\"Player 2\", \"Terran Civilian\", \"Location 2\", Exactly, %i);\r\n\r\nActions:\r\n\tSet Switch(\"Switch 1\", set);\r\n\tPreserve Trigger();\r\n}\r\n\r\n//-----------------------------------------------------------------//", x, x);
    }
    return 0;
}
I made a trigger duplicator in VB that can be used for that too.
5 bucks says mine runs faster :P
5 bucks says no one wants to download a C compiler, and also have to edit that to make it duplicate different things. My program is noob, but it's convenient.



None.

Sep 22 2007, 10:10 pm AntiSleep Post #20



probably, i already had one installed so it wasnt a big deal.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:07 pm]
jjf28 -- o nice
[05:00 pm]
Oh_Man -- the korean translation is finally complete, bloody hell, what a mission
[2020-7-08. : 11:29 am]
Christien Chapman -- I wish I could help
[2020-7-08. : 11:29 am]
Christien Chapman -- Ok
[2020-7-08. : 11:28 am]
Christien Chapman -- O
[2020-7-07. : 8:03 pm]
No-Name-Needed-II -- If anyone who moderates this site is listening, I've been trying to recover my No-Name-Needed account but I've lost track of my email and pass word for it when my old computer crashed.
[2020-7-07. : 4:25 pm]
Apos -- green
[2020-7-07. : 3:03 pm]
lil-Inferno -- ya
[2020-7-07. : 1:15 am]
RdeRenato -- xd
[2020-7-07. : 12:35 am]
KrayZee -- Indigo
Please log in to shout.


Members Online: Roy, jun3hong