Staredit Network

Staredit Network -> UMS Assistance -> Slot Machine
Report, edit, etc...Posted by I_Love_SCVS on 2006-10-31 at 02:36:15
i want to learn how to make a slot machine for a defense where they do the slot machine and what ever they get (marine, fire bat, firebat ) they get that in their bunker. if they get (marine, marine, marine) they get that in their other bunker. They have to do the slot machine every time they build a Bunker. so can someone help me biggrin.gif

Thanks for the appreciation
Report, edit, etc...Posted by DevliN on 2006-10-31 at 03:33:18
Use random switches. Basically you need 3 switches per player:
  • P1 Randomize [Switch 1]
  • P1 Rand1 [Switch 2]
  • P1 Rand2 [Switch 3]
When you want to "spin the slots" (or in other words get random units), set "P1 Randomize" and then randomize "P1 Rand1" and "P1 Rand2." It should be like this:

Trigger
Description:
Randomize the Units
Players:
¤ Player 1
Conditions:
¤ Current player brings at least 1 unit to a location that will create the units or builds a bunker that needs to be filled.
¤ Current player brings at most 3 men to [Location where you'll keep the units until three are made]
Actions:
¤ Set "P1 Randomize"
¤ Randomize "P1 Rand1"
¤ Randomize "P1 Rand2"
¤ Preserve trigger


Next, you need a trigger for each outcome. Here would be a list of outcomes:
  • Rand1 is Set/Rand2 is Set = Create a Marine. Re-Randomize.
  • Rand1 is Set/Rand2 is Clear = Create a Firebat. Re-Randomize.
  • Rand1 is Clear/Rand2 is Set = Create a Ghost. Re-Randomize.
  • Rand1 is Clear/Rand2 is Clear = Re-Randomize.
Basically the Marine one would be like this:
Trigger
Players:
¤ Player 1
Conditions:
¤ "P1 Randomize" is Set
¤ "P1 Rand1" is Set
¤ "P1 Rand2" is Set
Actions:
¤ Create 1 Terran Marine for Current Player at [Location where you'll keep the units until three are made]
¤ Randomize "P1 Rand1"
¤ Randomize "P1 Rand2"
¤ Preserve trigger


When you have three units at the [Location where you'll keep the units until three are made] place, clear "P1 Randomize" and move the units to the bunker.
Report, edit, etc...Posted by I_Love_SCVS on 2006-10-31 at 15:14:30
Thanks! I'll give it a shot, is there any other triggers that might also work?

Thanks!! biggrin.gif
Report, edit, etc...Posted by DevliN on 2006-10-31 at 15:30:23
Well a death counter would work, too. You could have a death counter with 10 outcomes:
Note: M is Marine, G is Ghost, and F is Firebat
  • MMM
  • MGG
  • MFF
  • FFF
  • FMM
  • FGG
  • GGG
  • GFF
  • GMM
  • GMF
Basically add 1 death to a specific unit (in this case, let's use the Nuclear Missile) and then preserve trigger. It should look like this:
Trigger
Conditions:
¤ Neutral/Computer player suffers at most 10 deaths of Nuclear Missile
Actions:
¤ Add 1 to deaths of Nuclear Missile for Neutral/Computer player
¤ Preserve trigger


And another like...
Trigger
Conditions:
¤ Neutral/Computer player suffers exactly 10 deaths of Nuclear Missile
Actions:
¤ Set deaths of Nuclear Missile to 0 for Neutral/Computer player
¤ Preserve trigger


Then when you create a bunker and want the units to be randomized, have ten triggers like the following:
Trigger
Conditions:
¤ Neutral/Computer player suffers exactly 1 death of Nuclear Missile
¤ Current Player brings exactly 1 bunker to an area or Current Player chooses to randomize units
Actions:
¤ Create 3 Terran Marines for Current Player at [Location where units are spawned]
¤ Move the unit that spawned the units to another location (i.e. if its a Bunker, remove it from the area, or if its a location you bring a civilian to move the civilian).
¤ Preserve trigger
Next Page (1)