Staredit Network > Forums > SC2 Assistance > Topic: Observer Dodge
Observer Dodge
Aug 3 2010, 2:21 am
By: Striker  

Aug 3 2010, 2:21 am Striker Post #1



I need some serious help with the triggering i have the terrain and layout done just need triggers
Mainly need help for picking how hard it is and for creating units for each level, and having units die when observers touch them. Thanks for any help you can provide.

Attachments:
Observer Dodge.SC2Map
Hits: 2 Size: 53.83kb



None.

Aug 17 2010, 4:37 am TheFreak Post #2



Could you please be a little bit more specific ? I think I have an idea of what you need and doesn't look hard to implement but I am not really quite sure of what you want.

~TheFreak



None.

Aug 17 2010, 5:05 am payne Post #3

:payne:

Basically, he wants those triggers:

1) A 'Difficulty Selection' menu
2) Based on the chosen difficulty, spawn 'x' number of observers in the map (x increases with difficulty)
3) If the player (which has only one unit) touches an observer, it musts die and wait for others to finish the level (reach the end) before respawning

:awesome:



None.

Aug 17 2010, 5:22 am shmeeps Post #4



This is what I use in my map, the difficulty is a number between 1-100, with 100 being the hardest (granted, the highest selectable is 70. We've never been able to take 100 :P). The selectable difficulties are Easy, Medium, Hard, and Impossible:

This one sets up and displays the dialog
Code
Start Difficulty Diag
   Events
   Local Variables
   Conditions
   Actions
       Timer - Start DifficultyDialogTimer as a One Shot timer that will expire in 15.0 Game Time seconds
       Timer - Create a timer window for DifficultyDialogTimer, with the title "Vote Time", using Remaining time (initially Visible)
       Variable - Set DifficultyDialogTimerWindow = (Last created timer window)
       Dialog - Create a Modal dialog of size (500, 400) at (0, 0) relative to Center of screen
       Variable - Set DifficultyDialog = (Last created dialog)
       Dialog - Set title of DifficultyDialog to "Please select a game difficulty."
       Dialog - Show DifficultyDialog for (All players)
       Dialog - Create a button for dialog DifficultyDialog with the dimensions (200, 50) anchored to Center with an offset of (0, -50) setting the tooltip to "Set the game difficulty to easy mod..." with button text "Easy" and the hover image set to ""
       Variable - Set DifficultyEasy = (Last created dialog item)
       Dialog - Create a button for dialog DifficultyDialog with the dimensions (200, 50) anchored to Center with an offset of (0, 0) setting the tooltip to "Set the game difficulty to medium m..." with button text "Medium" and the hover image set to ""
       Variable - Set DifficultyMed = (Last created dialog item)
       Dialog - Create a button for dialog DifficultyDialog with the dimensions (200, 50) anchored to Center with an offset of (0, 50) setting the tooltip to "Set the game difficulty to hard mod..." with button text "Hard" and the hover image set to ""
       Variable - Set DifficultyHard = (Last created dialog item)
       Dialog - Create a button for dialog DifficultyDialog with the dimensions (200, 50) anchored to Center with an offset of (0, 100) setting the tooltip to "Set the game difficulty to impossib..." with button text "Impossible" and the hover image set to ""
       Variable - Set DifficultyImp = (Last created dialog item)


This one handles any input from each user
Code
Handle Difficulty Diag
   Events
       Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
   Local Variables
   Conditions
   Actions
       General - Switch (Actions) depending on (Used dialog item)
           Cases
               General - If (DifficultyEasy)
                   Actions
                       Variable - Set GameDifficultyVote[0] = (GameDifficultyVote[0] + 1)
               General - If (DifficultyMed)
                   Actions
                       Variable - Set GameDifficultyVote[1] = (GameDifficultyVote[1] + 1)
               General - If (DifficultyHard)
                   Actions
                       Variable - Set GameDifficultyVote[2] = (GameDifficultyVote[2] + 1)
               General - If (DifficultyImp)
                   Actions
                       Variable - Set GameDifficultyVote[3] = (GameDifficultyVote[3] + 1)
           Default
       General - If (Conditions) then do (Actions) else do (Actions)
           If
               ((GameDifficultyVote[0] + GameDifficultyVote[1]) + (GameDifficultyVote[2] + GameDifficultyVote[3])) == ActivePlayers
           Then
               Timer - Start DifficultyDialogTimer as a One Shot timer that will expire in 0.1 Game Time seconds
           Else


This one makes the final decision once all players have made a choice or the choice timer expires:
Code
End Difficulty Diag
   Events
       Timer - DifficultyDialogTimer expires
   Local Variables
       GreatestPos = 0 <Integer>
       GreatestInt = 0 <Integer>
   Conditions
   Actions
       Dialog - Destroy DifficultyDialog
       Timer - Destroy DifficultyDialogTimerWindow
       Variable - Set GreatestInt = GameDifficultyVote[0]
       Variable - Set GreatestPos = 0
       General - If (Conditions) then do (Actions) else do (Actions)
           If
               GreatestInt < GameDifficultyVote[1]
           Then
               Variable - Set GreatestInt = GameDifficultyVote[1]
               Variable - Set GreatestPos = 1
           Else
       General - If (Conditions) then do (Actions) else do (Actions)
           If
               GreatestInt < GameDifficultyVote[2]
           Then
               Variable - Set GreatestInt = GameDifficultyVote[2]
               Variable - Set GreatestPos = 2
           Else
       General - If (Conditions) then do (Actions) else do (Actions)
           If
               GreatestInt < GameDifficultyVote[3]
           Then
               Variable - Set GreatestInt = GameDifficultyVote[3]
               Variable - Set GreatestPos = 3
           Else
       General - Switch (Actions) depending on GreatestPos
           Cases
               General - If (0)
                   Actions
                       Variable - Set Difficulty = 15
                       UI - Display "Game difficulty set to easy!" for (All players) to Error area
               General - If (1)
                   Actions
                       Variable - Set Difficulty = 25
                       UI - Display "Game difficulty set to medium!" for (All players) to Error area
               General - If (2)
                   Actions
                       Variable - Set GameLength = 40
                       UI - Display "Game difficulty set to hard." for (All players) to Error area
               General - If (3)
                   Actions
                       Variable - Set GameLength = 60
                       UI - Display "Game difficulty set to impossible....." for (All players) to Error area
           Default
       Trigger - Turn Start Difficulty Diag Off
       Trigger - Turn Handle Difficulty Diag Off
       Trigger - Turn (Current trigger) Off




None.

Aug 17 2010, 5:37 am Deev Post #5



Awww, And I was just about to make a map for him with all the triggers. I'll just explain them here instead, the way I did it.

Part 1: Setting the difficulty
- Creating a dialog menu, with three buttons (Easy, Medium, Hard)
- Creating a trigger to detect what the player clicks and runs one of three triggers afterwards.

Part 2: Spawning the observers
- Place a region on the area they can spawn in.
- Use trigger - create x unit @ random point in region for player #

Part 3: Unit dies if near them.
- Put the enemy player, with the observers in a unit group.
- Use trigger - Unit within 1.0 range of units in unit group enemy player - then kill unit and write game over.

There are a lot of custom options you can add to this. Multi player features like vote on difficulty, text to players when someone dies etc etc .. If you still need the map "coded" despite the help here, and in the o.p. just let me know and I'll help you through, and finish all the triggers for you in whatver way you want 'em.

Regards,
Deev



None.

Aug 17 2010, 5:49 am shmeeps Post #6



Sorry lol, I already had that made so I figured I'd just go ahead and post it.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:09 pm]
Ultraviolet -- let's fucking go on a madmen rage bruh
[10:01 pm]
Vrael -- Alright fucks its time for cake and violence
[2024-5-07. : 7:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
Please log in to shout.


Members Online: Moose