• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

singleplayer???

Status
Not open for further replies.
Level 5
Joined
Dec 7, 2008
Messages
90
Can somebody help me im working on a map now i opened an orpg and i see the save/load system works only in Multiplayer so can somebody tell me how to make my map to be played just in multiplayer and how to change it in both when i want????
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

To make it simple you can use this trigger:

  • Detect Singleplayer
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set TempPlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
      • Set TempInt = (Number of players in TempPlayerGroup)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInt Less than or equal to 1
        • Then - Actions
          • Trigger - Turn off Save <gen>
          • Trigger - Turn off Load <gen>
          • Game - Display to (All players) the text: SINGLEPLAYER MODE!
        • Else - Actions
          • Game - Display to (All players) the text: MULTIPLAYER MODE!
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
      • Set TempInt = 0
[ Here you just turn of the save and load funtion ]

  • Detect Singleplayer 2
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set TempPlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
      • Set TempInt = (Number of players in TempPlayerGroup)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInt Less than or equal to 1
        • Then - Actions
          • Player Group - Pick every player in TempPlayerGroup and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: NO SINGLEPLAYER!
        • Else - Actions
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
      • Set TempInt = 0
[ Here you defeat the player if he plays in singleplayer ]

Greetings
~ The Bomb King > Dr. Boom
 
Level 4
Joined
Jun 22, 2009
Messages
63
Should Work

  • Multiplayer
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set PlayerCount = 0
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to User
              • ((Picked player) slot status) Equal to Is playing
            • Then - Actions
              • Set PlayerCount = (PlayerCount + 1)
            • Else - Actions
  • Multiplayer Detect
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerCount Greater than 1
        • Then - Actions
          • Set Multiplayer = True
        • Else - Actions
          • Game - Defeat Player 1 (Red) with the message: Multiplayer Only!
 
Status
Not open for further replies.
Top