Staredit Network

Staredit Network -> UMS Showcase -> Advanced Switch Theory
Report, edit, etc...Posted by dashrike on 2004-04-27 at 13:02:08
**********************************

MERGED TOPIC: START

**********************************


o.O 6 would be fun... Not really. I could write it out though...

Here's that. Didn't take nearly as long as I thought...

CODE

s1: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoooooooooooooooooooooooooooooooo
s2: xxxxxxxxxxxxxxxxooooooooooooooooxxxxxxxxxxxxxxxxoooooooooooooooo
s3: xxxxxxxxooooooooxxxxxxxxooooooooxxxxxxxxooooooooxxxxxxxxoooooooo
s4: xxxxooooxxxxooooxxxxooooxxxxooooxxxxooooxxxxooooxxxxooooxxxxoooo
s5: xxooxxooxxooxxooxxooxxooxxooxxooxxooxxooxxooxxooxxooxxooxxooxxoo
s6: xoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxo

ohmy.gif

Had I any actual intelligence, I would write a prog to do it for me. Don't know how though... mellow.gif
Report, edit, etc...Posted by Yoshi da Sniper on 2004-04-27 at 13:11:32
Lol, dont get me started with binary logic!
Report, edit, etc...Posted by dashrike on 2004-04-27 at 13:12:35
Dude I actually like binary stuff. It makes complete sense! As opposed to Java anyhow, the only other language I know enough in to write anything...
Report, edit, etc...Posted by .Coko[CK] on 2004-04-27 at 13:21:36
If it makes so much sense, they why with decimals does it never fully work, or cannot.
It can only work through integers, nothing else, which although limitless, means a requirement of raising the binary number and adding more, rather than using numbers of a low level, but not integer.
Report, edit, etc...Posted by Clokr_ on 2004-04-27 at 13:38:47
Hey guys, I had an idea =P

CONVERTING 8 SWITCHES (byte) INTO A DEATH COUNTER


Trigger 0
Conditions:
(Conditions that you want)
Actions:
Set deaths for 'unit2': Set to 0
Set deaths for 'unit': Set to 1
Set deaths for 'unit': Set to 2
Set deaths for 'unit': Set to 3
Set deaths for 'unit': Set to 4
Set deaths for 'unit': Set to 5
Set deaths for 'unit': Set to 6
Set deaths for 'unit': Set to 7
Set deaths for 'unit': Set to 8
Preserve Trigger


Trigger 1
Conditions:
Deaths for 'unit' is 1
Switch 1 is set
Actions:
Set deaths for 'unit': Set to 0
Set deaths for 'unit2': Add 1
Preserve Trigger


Trigger 2
Conditions:
Deaths for 'unit' is 2
Switch 2 is set
Actions:
Set deaths for 'unit': Set to 0
Set deaths for 'unit2': Add 2
Preserve Trigger


Trigger 3
Conditions:
Deaths for 'unit' is 3
Switch 3 is set
Actions:
Set deaths for 'unit': Set to 0
Set deaths for 'unit2': Add 4
Preserve Trigger


Trigger 4
Conditions:
Deaths for 'unit' is 4
Switch 4 is set
Actions:
Set deaths for 'unit': Set to 0
Set deaths for 'unit2': Add 8
Preserve Trigger


Trigger 5
Conditions:
Deaths for 'unit' is 5
Switch 5 is set
Actions:
Set deaths for 'unit': Set to 0
Set deaths for 'unit2': Add 16
Preserve Trigger


Trigger 6
Conditions:
Deaths for 'unit' is 6
Switch 6 is set
Actions:
Set deaths for 'unit': Set to 0
Set deaths for 'unit2': Add 32
Preserve Trigger


Trigger 7
Conditions:
Deaths for 'unit' is 7
Switch 7 is set
Actions:
Set deaths for 'unit': Set to 0
Set deaths for 'unit2': Add 64
Preserve Trigger


Trigger 8
Conditions:
Deaths for 'unit' is 8
Switch 8 is set
Actions:
Set deaths for 'unit': Set to 0
Set deaths for 'unit2': Add 128
Preserve Trigger


I think that this will work. If not maybe adding a WAIT between the actions of the first trigger...

unit: A unit that cant die. Just used for save stuff in that process.
unit2: A unit that cant die. Is where it will save the value of the byte.
Switches 1-8: The 8 bits that makes the byte.




That can be used for create random numbers...
Report, edit, etc...Posted by Clokr_ on 2004-04-27 at 14:51:32
QUOTE((U)Bolt_Head @ Apr 27 2004, 12:45 PM)
Edit: except the random part, but you still would need 256 triggers for that.

You can use At least and At most statements for reduce the number of triggers if you dont need all the possibilities. Also, you can use that triggers for create a lower number:

Randomize switch 1, set to 0 switches 2-8 = Number between 0 and 1
Randomize switch 1-2, set to 0 switches 3-8 = Number between 0 and 3
Randomize switch 1-3, set to 0 switches 4-8 = Number between 0 and 7
Randomize switch 1-4, set to 0 switches 5-8 = Number between 0 and 15
Randomize switch 1-5, set to 0 switches 6-8 = Number between 0 and 31
Randomize switch 1-6, set to 0 switches 7-8 = Number between 0 and 63
Randomize switch 1-7, set to 0 switches 8 = Number between 0 and 127
Randomize switch 1-8 = Number between 0 and 255

And with a death counter you can use "Add" and "Subtract".
Report, edit, etc...Posted by .Coko[CK] on 2004-04-27 at 17:19:52
I see what you mean, and understand what you mean. If you don't read on earlier about the amount of options or possibilities.
Its 2^X (X Being number of Switches)
This also includes Zero so although you normally would have 2, 4, 8, 16, 32, 64, 128 and 256 in this case you minus one and add nought to get the possible possibilities. Shouldn't be over your head, just proving himself right thats all.
Report, edit, etc...Posted by dashrike on 2004-04-28 at 07:54:32
I was thinking more of Clokr_'s trigger printouts etc. I understand the concept behind binary, I'm just not that good at triggering, so it confused me...
Report, edit, etc...Posted by .Coko[CK] on 2004-04-28 at 14:05:16
Oh, sorry, didn't mean to insult your intelligence, well the triggering wasn't to heavy, nothing more than a jumping up on the random scale, with the increase factor similar to the increase of randomisation, i believe...
Report, edit, etc...Posted by Clokr_ on 2004-04-28 at 15:05:08
Well, the first trigger set the out to 0 and controls the operation (first plus the value of first bit, then the value of the second, etc)
The others triggers just checks if the bit (switch) is set and add the quantity that each bit represents (powers of two: 1, 2, 4, 8, 16, 32, 64, 128)
Report, edit, etc...Posted by Mini Moose 2707 on 2004-04-28 at 15:11:03
This is starting to make sense.

First, we have a trigger that randomizes Switches 1 through x...

Then we have the following triggers...

Conditions: Switch 1 is set
Actions: Clear Switch 1
Add 1 Death Count for Something

Then we have a trigger for Switch 2 and 2 Death counts, then switch 3 and 4 death counts, Switch 4-8 Deaths, Switch 5-16 Deaths, Switch 6-32 Deaths, Switch 7-64 Deaths.

And so on.
That would allow you to generate a random number from 0 to (2^X)-1...
And reverse for subtraction even...
That would save a lot of triggers and switch messing for generating a random number. biggrin.gif
Report, edit, etc...Posted by Clokr_ on 2004-04-28 at 15:58:07
Oh maybe this triggers are easier to understand. Use this triggers instead of the ones of my last post.

Trigger 1
Conditions:
Switch 1 is set
Actions:
Set Switch 1: Clear
Set deaths for 'unit': Add 1
Preserve Trigger


Trigger 2

Conditions:
Switch 2 is set
Actions:
Set Switch 2: Clear
Set deaths for 'unit': Add 2
Preserve Trigger


Trigger 3
Conditions:
Switch 3 is set
Actions:
Set Switch 3: Clear
Set deaths for 'unit': Add 4
Preserve Trigger


Trigger 4

Conditions:
Switch 4 is set
Actions:
Set Switch 41: Clear
Set deaths for 'unit': Add 8
Preserve Trigger


Trigger 5
Conditions:
Switch 5 is set
Actions:
Set Switch 5: Clear
Set deaths for 'unit': Add 16
Preserve Trigger


Trigger 6

Conditions:
Switch 6 is set
Actions:
Set Switch 6: Clear
Set deaths for 'unit': Add 32
Preserve Trigger


Trigger 7
Conditions:
Switch 7 is set
Actions:
Set Switch 7: Clear
Set deaths for 'unit': Add 64
Preserve Trigger


Trigger 8
Conditions:
Switch 8 is set
Actions:
Set Switch 8: Clear
Set deaths for 'unit': Add 128
Preserve Trigger


I think that this will work. If not maybe adding a WAIT between the actions of the first trigger...

unit: A unit that cant die. Is where it will save the value of the byte.
Switches 1-8: The 8 bits that makes the byte


For call that use this:

Trigger
Conditions:
(Conditions)
Actions:
Set deaths for 'unit': Set to 0
Set Switch 1: Randomize
Set Switch 2: Randomize
Set Switch 3: Randomize
Set Switch 4: Randomize
Set Switch 5: Randomize
Set Switch 6: Randomize
Set Switch 7: Randomize
Set Switch 8: Randomize
Report, edit, etc...Posted by dashrike on 2004-04-28 at 16:08:38
Hey Clokr_ yes we understand you have lots of time to type out long lists of triggers. I think we get it though.

(if I do, most everybody else will...)
Report, edit, etc...Posted by .Coko[CK] on 2004-04-28 at 16:52:27
Yeah, thats a very useful system, I think people could use a reduced system to calculate possible points for kills of units, if you include that in the Conditions, maybe adding the possiblity of an amount of minerals and gas taken after killing an opponent, set to different amounts over a range...

What do people think?
Useful in World of Starcraft!

**********************************

MERGED TOPIC: END

**********************************
Report, edit, etc...Posted by Mini Moose 2707 on 2004-04-28 at 16:53:37
**********************************

ACTUAL TOPIC: START

**********************************


Okay, this is going to confuse the censored.gif out of all of you. If you're not an advanced mapper, it's better just to use the demonstration to see how it works or just leave. wallbash.gif

But, here's the situation.

We have a 16x16 grid made of 2x2 squares. That's 256 squares total.
Now, we want to randomly place a Flag on one of the squares. Exactly on a square, not some Junkyard dog placement thing.

You're saying, "WTF Moose, it can't be done!".
You say "Switches... 8". I say, "yep".
You say "Triggers... way over 256?". I say "19, 7 being Hyper Triggers, 1 more for added speed".
You say "Locations... one for each square... 256? WTF. You've already used the goddamn map, you're an @§$h?lé Moose!". I say "Nope, just three. One to spawn the activation unit, one to activate the placement, and one for unit centering."
You say "Time... the generation itself has to take at least a minute". I say "Nope, three seconds tops".
You say "You wasted hours of your life making this". I say "About a half hour".

The best part is. This can be done through my Advanced Switch Theory.
The map is attached, and unlocked. Enjoy the triggers, this is gold my friends.

The triggers are relatively simple once you understand. The switches are randomized and a binary system adds them converting them into an amount of gas between one and 255. The gas is subtracted and a location over each Observer gives it to another player, once for each gas. When the gas hits zero, the Flag places. When you reset, the Observers and returned and a new random number is generated.

Hope you guys find use for this in a map. I sure as hell know I will. sorcerer.gif
Report, edit, etc...Posted by Yoshi da Sniper on 2004-04-28 at 17:31:56
I just abused my moderator powers to merge the two topics, unfortanately, its dated, so im making a few edits.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-04-28 at 17:33:07
Very nice Moose. I like how the randomization is simplified with the minerals and subtraction method. (im not seeing a use for binary in switches)
Report, edit, etc...Posted by .Coko[CK] on 2004-04-28 at 17:50:07
I like it!
Note; although i like making maps for fun, i am a member of a map making team, and this will be used in the revised version of the campaign, for my unit appearing and attacking, and you will receive credit for it.
Report, edit, etc...Posted by dashrike on 2004-04-29 at 10:41:49
Hey I started this topic even though I know very little about switches! biggrin.gif
Report, edit, etc...Posted by Yoshi da Sniper on 2004-04-29 at 11:13:40
You didn't I just merged two topics because they seemed relevant to mooses stuff.
Report, edit, etc...Posted by .Coko[CK] on 2004-04-29 at 14:22:31
Thats some gosu merging powers!
Well, i've looked into the idea of having this as a system for random adding of minerals, and its easily possible, either by changing on the trigger the death to minerals, for that person, or by converting them in another trigger spot, can be set differently for each type of unit that can be killed, and if you use the latter way, you can decide the amount that is taken, so if it gets to 1000 you could convert it to 250 minerals and such.
Report, edit, etc...Posted by EzDay281 on 2004-05-04 at 00:31:41
I'm confused about WTF any of this is...
someone explain to me?
Report, edit, etc...Posted by .Coko[CK] on 2004-05-04 at 12:21:58
Its about using Switches, in the way Binary is used, to create random figures or numbers, for possible uses in varying on fields...
Next Page (1)