Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Randomization Problems
[SOLVED] Randomization Problems
This topic is locked. You can no longer write replies here.
Feb 9 2012, 12:48 pm
By: Mouse  

Feb 9 2012, 12:48 pm Mouse Post #1



I'm making a map that is Cat n Mouse, but it is different from most. There are 6 arenas and the game randomly chooses an arena, then randomly chooses a Cat from the available people there. It spawns the units in a box in the bottom left corner of the map, then moves them to the appropriate arena. For some reason, when a Mouse gets killed, it respawns in the middle and is invincible. On top of that, all of the game ending triggers screw up if all of the mice are invincible in that round. Could someone take a look at it and see what is wrong? I have tried with multiple people and they cannot.

Attachments:
Survival.scm
Hits: 154 Size: 55.26kb



None.

Feb 9 2012, 12:55 pm Rye123 Post #2



err...did u check the locations layer? maybe u screwed up in there...

PS: I dont understand death counters cos i dont give a damn about learning them... :bleh:



None.

Feb 9 2012, 1:34 pm rockz Post #3

ᴄʜᴇᴇsᴇ ɪᴛ!

when something spawns in the middle of the map it's because the location you're creating the unit on is in the middle of the map, usually because you're centering it on something else, which didn't exist at the time of centering, and thus, the location was centered on "anywhere".



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Feb 9 2012, 8:50 pm Mouse Post #4



If you look at the map, it's not centered anywhere. The triggers for the randomization and center view are for Force 1. When they spawn to the box on the bottom left, they don't always get moved to the correct "Arena" that the switches are set to. If you didn't look at the map Rockz, please look at the triggers and then tell me ;P

EDIT: Or here's a better question: Could someone design a randomization that will choose a cat out of 7 people and create the Cat and the 6 mice, in a box. Then have it randomize an Arena and move the units to that Arena?

Post has been edited 1 time(s), last time on Feb 10 2012, 1:40 am by Mouse.



None.

Feb 10 2012, 1:59 am Mouse Post #5



Here's the replay.

Attachments:
Azrael.rep
Hits: 0 Size: 24.29kb



None.

Feb 10 2012, 7:20 pm Roy Post #6

An artist's depiction of an Extended Unit Death

Quote from Mouse
EDIT: Or here's a better question: Could someone design a randomization that will choose a cat out of 7 people and create the Cat and the 6 mice, in a box. Then have it randomize an Arena and move the units to that Arena?
Sure:
Triggers

Not the most optimized, I'd imagine, but it's clean enough to get the job done.




Feb 11 2012, 6:28 am rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

I assumed "For some reason, when a Mouse gets killed, it respawns in the middle" meant that it shouldn't be respawning, and especially shouldn't be respawning in the middle of the map.

Code
Trigger("Force 1"){
Conditions:
    Deaths("Current Player", "Terran Marker", Exactly, 1);
    Command("Force 1", "Torrasque (Ultralisk)", At least, 1);
    Command("Current Player", "Torrasque (Ultralisk)", Exactly, 0);
    Command("Current Player", "Protoss Probe", Exactly, 0);

Actions:
    Preserve Trigger();
    Set Deaths("Current Player", "Warp Gate", Set To, 1);
    Set Deaths("Current Player", "Xel'Naga Temple", Set To, 0);
    Create Unit with Properties("Current Player", "Protoss Probe", 1, "008", 1);
    Display Text Message(Always Display, "You have been chosen as a Mouse. RUNN!!!");
    Set Resources("Current Player", Set To, 12, ore);
}

This is the only trigger that makes invincible mice, so it's clearly running when your mouse dies. You need to add 1 or something to terran marker so that you don't make more than one thing.

In any case it's really hard to look at someone else's triggers and figure out exactly how they work with no background information, no concrete listing of the "problem" and what all the variables are.

IMO it's easiest to randomize a switch-> add 4 to DC if it's set, randomize that same switch again, add 2 to DC, randomize -> add 1. This gives you a number from 0 to 7 which you can then use to organize stuff.
For randomizing the cat for the round, assign the numbers to each player and repeat the randomization if they are not in the game. The sample trigger should look like this:

if
DC is exactly 5
Player 5 commands at least 1 building (or some other way to know that the player is in the game)
DC "randomize cat" is 1
then
this player is the cat, set a DC "is cat" or something.
set DC "randomize cat" to 0
repeat for all players, and have the triggers to randomize the switches/add to DC only run when "randomize cat" is 1. When the round is over and you're ready for a new cat, kill off all the units, set "is cat" to 0 for everyone and set "randomize cat" to 1. It will eventually find a cat for you.

In the same way, you can do "randomize arena", except you don't have to worry do much about leavers. Just repeat the randomization if the DC is 6 or 7 so you get a random number between 0 and 5.

Fix your randomizations and make sure your triggers which are only supposed to run once per round are truly running once per round by adding in a DC. Then we'll work on fixing the fact that your victory doesn't ever work.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: eksxo, MetalGear