• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Checking for Single Player

Checking for Single Player


A lot of RPGs have a function that just boots you out if you play it alone. That's completely idiotic. Checking if a game is Single Player is SO incredibly easy. It's a single condition.



The Condition


Yes. Just one simple condition. It is:
  • Single Player Checking
    • Events
      • Map initialization
    • Conditions
      • Current game is singleplayer Equals (==) True
      • Actions
You can find it by going into conditions: Boolean>Preset>Current game is singleplayer. That's it. That's all you need for it.



Boot Trigger [Optional]


If you actually want to boot people if in SP, just use this incredibly simple trigger.
  • Single Player Checking
    • Actions
      • Map initialization
    • Conditions
      • Current game is singleplayer Equals (==) True
    • Actions
      • Player Group - Pick every player in (All players) and do (Game - Defeat (Picked player) with the message: Use LAN or B.Net instead of Single Player)

That's all you really need for a system to disallow single playing. Thanks for reading.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Best method I know is to use game cache, save it and then try and load it. If it is LAN or Bnet, it will fail to load and no values will be stored in the cache (thus you can tell it is MP). If it is single player, values will be saved and then loaded so a certain value would be returned.

Basically, store a value in a gamecache.
Save game cache.
Load game cache as a new variable.
Check if game cache has stored value.

I believe this is what SWAT aftermath uses. If it does not work then obviously they use the game cache in another way but it definatly uses one for single player detection.
 
Top