Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [Help!] Order Matters
[Help!] Order Matters
Nov 9 2015, 8:36 am
By: QPreach  

Nov 9 2015, 8:36 am QPreach Post #1



Hello. I am trying to make a set of combinations where order matters.

- I need help on making 2 different results (M)arine + (F)irebat and (F + M)
- Currently my (M + F) and (F + M) produce the same result.
- I also want to know simpler techniques for this triggering since I feel that I am overusing death counters.

Attachments:
Permuation.scm
Hits: 2 Size: 39.75kb

Post has been edited 1 time(s), last time on Nov 9 2015, 8:55 am by QPreach.



None.

Nov 9 2015, 12:57 pm CecilSunkure Post #2



Hi there :)

There are 4 different permutations, like you have already figured out.

MF
FM
MM
FF

To represent these in a simple way you need two different variables (either two switches or two deathcounts). Say we have switch A and switch B. A represents the first unit made and B represents the second unit made. ON means F, OFF means M. This leads to a pretty obvious encoding:

A OFF, B ON
A ON, B OFF
A OFF, B OFF
A ON, B ON

Each line can be a trigger that contains these two conditions.

Does this make sense? Hope this helps!



None.

Nov 9 2015, 1:53 pm QPreach Post #3



Thank you for replying :-)

Now, if I want to make it more complicated with my orders.

- 3 sets: A, B, C, means I would need 3 death counters

("A, B, C" in parenthesis are the death counters)

AAA = 1, 1, 1; (3 A, 0 B, 0 C)
AAB = 1, 1, 2; (2 A, 1 B, 0 C)
AAC = 1, 1, 3; (2 A, 1 B, 1 C)
ABB = 1, 2, 2; (1 A, 2 B, 0 C)
ABC = 1, 2, 3; (1 A, 1 B, 1 C)
ACC = 1, 3, 3; (1 A, 0 B, 2 C)
BBB = 2, 2, 2; (0 A, 3 B, 0 C)
BBC = 2, 2, 3; (0 A, 2 B, 1 C)
BCC = 2, 3, 3; (0 A, 1 B, 2 C)
CCC = 3, 3, 3; (0 A, 0 B, 3 C)

Is this correct?

Post has been edited 2 time(s), last time on Nov 9 2015, 3:35 pm by QPreach.



None.

Nov 9 2015, 6:53 pm NudeRaider Post #4

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

If you want to save on death counters you can use a mathematical trick to store more information in that one value.
For simplicity's sake lets assume a letter can be used at most 9 times in a combination (your example says 3, so you have a lot of room to expand).

Then you give the letter A a value of 1, the letter B a value of 10, the letter C a value of 100, and so on.
The biggest number you can store in a death counter is ~2*10^9, so using this system the biggest value you can assign up to 9 times is 10^8 = 100 Million. This means you can use 8 different letters, setting H's value to 100 Million.

Using your example of 3 letters, 3 combinations you can do the following:
Player builds 2 Marines (= letter A) and a Firebat (letter B) = AAB
=> Add the following to your death counter:
2*1 (2*A)
1*10 (1*B)
=> Value of the DC is 12. => Make a condition if DC is exactly 12.

You should see how easy it is to add more combinations. If you have further questions just ask.

table of values


Post has been edited 1 time(s), last time on Nov 9 2015, 7:00 pm by NudeRaider.




Nov 9 2015, 8:33 pm QPreach Post #5



Oh man, I didn't expect that number trick. Thank you!

So I was trying to incorporate this combination system into a map. With the terran barrack, I will have 4 base abilities and I'm trying to make combinations out of them. The max will be 3 sequence (MMM, MMF, etc).

Using the math trick will definitely save some death counters, but I am unsure of how to incorporate into the combo system.

For the combo system, I want to give players a certain amount of time to input specific combinations to make different abilities.

My problem is permuting the sequences.
What I have done so far is making a combo reader but it is for combination not permutation. M + M + F = F + M + M


(Sorry for expanding on the initial problem >< )

EDIT
ahh, I think I'm onto something; I'll show the map if I am stuck HAHA

Post has been edited 3 time(s), last time on Nov 9 2015, 8:53 pm by QPreach.



None.

Nov 9 2015, 10:40 pm QPreach Post #6



Okay, I am stuck D:
I think I made the combos fairly decent that it is permutation and not combination. Although I feel like my conditions are a bit redundant...

Anyway, my problem is that I want to have a trigger where it breaks up the combination when the sequence is more than 3 ( C + F + F + M, C + G + M + M) into smaller sequences.

I made (C + C + C + F), and I want the trigger to activate the highest priority, (C + C + F), and, then afterward, (C), how would I do it?

EDIT

Or, make it that the first 3 sequence goes through first (C + C + C) and then (F)

Attachments:
beta.scx
Hits: 0 Size: 105.6kb

Post has been edited 1 time(s), last time on Nov 10 2015, 12:58 am by QPreach.



None.

Nov 9 2015, 11:04 pm NudeRaider Post #7

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

You can do that similarly.

Define A = 1, B = 2, C = 3, etc.
now the first letter entered *1, the 2nd *10, the 3rd *100, etc.
AAB would be 1*1 + 10*1 + 100*2 = 211

hope that makes sense.




Nov 10 2015, 12:48 am QPreach Post #8



Quote from NudeRaider
You can do that similarly.

Define A = 1, B = 2, C = 3, etc.
now the first letter entered *1, the 2nd *10, the 3rd *100, etc.
AAB would be 1*1 + 10*1 + 100*2 = 211

hope that makes sense.

Ooo. I get what you're saying. That will make 3 death counters into 1. Thank you!



None.

Nov 10 2015, 2:09 am QPreach Post #9



Thank you guys, I am satisfied with my care ^^



None.

Nov 10 2015, 2:53 am Butch Post #10

PROFESSIONAL MAP MAKER

I do this a lot in my maps as it allows you to have a larger choice of unique input.

For each unique input I have a deathcounter, it stores what type of input it was, whether it's a marine, firebat, ghost, or medic.

No input = 0
Marine = 1
Firebat = 2
Ghost = 3
Medic = 4

So if you want the player to be able to do combos of 3 different inputs then you need 3 different DCs to store their values

input1 (0-4)
input2 (0-4)
input3 (0-4)

Then I have a deathcounter that acts as a timer, it starts counting when input1 = at least 1.
This timer determines when the input should actually be read (the end of the time it might take for the player to press another key, which happens to be like 5DC)

so it goes like this

Player presses M -> input1 is set to 1, because Marine = 1 -> timer is set to 5, each cycle is subtracted by 1

Player presses F before timer reaches 0 -> input2 is set to 2 because Firebat = 2, timer is set to 5 again so the player has time to press another key for input3

Player presses M before timer reaches 0 -> input3 is set to 1 because Marine = 1, timer is set to 0/set a boolean or something to say the combo is over.

now you have 3 variables that tell you what the player pressed. you can use this as conditions to trigger spells/use items/whatever it is you're doing.

The only downside to this method is that there is a delay between input and an action happening because the system has to wait 5 cycles before the input can be read to allow the player time to possibly hit another key.

I hope this makes sense. This is what I do and it works beautifully for what I need.


Here is the system in actual oreo triggers, the difference is I'm using a gateway instead of a barracks. Also, instead of setting another dc or something to flag that the input is done, I just set $input_timer to 1.



Post has been edited 1 time(s), last time on Nov 10 2015, 2:59 am by Butch.



None.

Nov 10 2015, 3:22 am QPreach Post #11



Oh! Thats neat, adding a timer each time you input a unit. I am currently using a universal timer where you have a time to input the command before it locks in.

If I do yours, it would definitely make the combo smoother especially if you want to spam a combo like (M + M + M..)



None.

Nov 13 2015, 9:10 am QPreach Post #12



Hey Butch, can you please check out my trigger to see my mistakes? :-(

Attachments:
testing.scm
Hits: 1 Size: 39.12kb



None.

Nov 14 2015, 2:22 am Butch Post #13

PROFESSIONAL MAP MAKER

This will work. I used M+M, F+F+G, G+C as examples. Try it. The triggers are all commented for you to better understand it.

Attachments:
combo_system.scm
Hits: 1 Size: 39.88kb



None.

Nov 14 2015, 9:19 pm QPreach Post #14



thank you so much! ^^



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[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
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: RIVE