• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Forbid SinglePlayer Trigger

Status
Not open for further replies.
Seas =)

Maybe this can help you

  • SingelPlayer
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • 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
              • (Player number of (Picked player)) Equal to 1
            • Then - Actions
              • Game - Defeat (Picked player) with the message: No SinglePlayer !
            • Else - Actions
This checks the player number status after 1 second. If you want a permanent check - use as event : Every 10 seconds or something like that
 
Rofl, this'll just kick Player 1 every time. Right trigger is:
  • NoSinglePlayer
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Int = Int + 1
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Int = 1
        • Then - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: No SinglePlayer !
 
Int is an integer variable with a starting value of 0. Have you done that, and it doesn't work?
 
Here's your map.

@Reaper2008

What if the human player uses computer players to trick your trigger? I changed that to All players matching condition :)
 

Attachments

Stupid and usless request.

No one needs to end the game when single player, and doing so will likly get your map rejected due to making it hard to test.

I advise disabling the save system (I take it thats what your worried about) when playing single player so they can not save a cheated character.

To do this I think there is a constant or something which WC3 engine sets up detecting when the game is hosted on any multiplayer (lan and Bnet) where cheats can not be used or if it is played single player (where they can).

A simple boolean allows you to do all your single player / multi player code via a simple conditional statement.

Best of all this idea is less flawed that just disabling solo play, as there is no need to do so if the person plays alone online as cheats are disabled anyway.

You can also detect singleplayer / multiplayer mode via gamecaches, singleplayer lets you load ones saved permantly wile multiplayer loads them all blank.
 
Just let people cheat in single player, it does no harm....
If its due to save / load systems, like I said simply disable the player from saving in singleplayer as then they can cheat all they want but it will not make them better in the multiplayer (how good maps like SWAT Aftermath do it).

If it is to stop people exploring your map, you are just asking for people like me to rip your map appart. I can discover all secrets in a map in under 30 minutes via reading the unprotectable trigger script and I make sure I tell everyone I meet online in the games about them. Do not take this as a threat or anything, it is to point out how feeble disabling singleplayer is on hiding secrets and in the end will ruin your map if implimented for this reason.

The easiest way is on map initialization, check if there are more than 1 human player in game, and if not then disable the save / load system.
 
Yeah, what DSG said is true. Take The Black Road, for example. You'll find many unprotected versions of it across the internet. And keep in mind that TBR is one of the most strictly protected maps out there.
 
HI again... :slp:
I need a trigger that finishes the game if there is only one player in the game when the game starts.
+rep for help!

I know you're working for an ORPG map reatek,and i would strongly suggest you not to disable singe player.I'm pretty sure i have a demo map no how to turn off all cheats.I will edit this post and attach it here if i find it.
EDIT:ok i found this.I don't remember where i download this map,but its not mine.Here is a way to disable cheating
 
Last edited:
This would work best (detects if game is offline rather than checking player count).

  • Events
    • Time - elapsed in game is 0.00 seconds
  • Conditions
  • Actions
    • Custom script: if ReloadGameCacheFromDisc() then
    • Custom script: call EndGame(false)
    • Custom script: endif

yeah, but isnt there also something like bj_IsSinglePlayer???

and for cheats there are anti-cheat systems here on hive, I learned how to disable money cheats and whosyourdaddy from some system is the spell section.....

is there someone out here who knows how to disable iseedeadpeople?
 
I'm not working on an ORPG - I'm working on a really small RPG, but it is still good to have these systems. I'm almost finished with it - I only need some terraining, the duel system and the most important that I can't do - Quests :|
 
Ummm, ORPG=RPG with Multi

If your banning Single on an RPG, WTH IS THE POINT.


Supergood, in what he is doing, disabling the cheats would work best, so just use Reason's system.

Orrrrr, mebbeh he is making an ORPG, and does not know definitions :/ soooo it would be better to disable the main save/load, just turn off the main trigger when it is single.


And in other news, congrats on 5,777 posts :D, needs 2k more
 
JASS:
scope disableSaveLoad initializer i
     private function i takes nothing returns nothing
          local integer index=0
          local integer counter=0
          loop
               exitwhen index>11
               if GetPlayerSlotState(Player(index))==PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(index))==MAP_CONTROL_USER then
                    set counter=counter+1
               endif
               set index=index+1
          endloop
          if counter<2 then
               call DisableTrigger(saveLoad)
          endif
     endfunction
endscope
 
I doubt he wants Jass, he seems like a gui'r


Still, reatek, if you want to use above, convert a blank trigger to custom script, you'll need to make the variables though

its local as you can see ;) There's no need to make the variables

Cokemonkey11's code would work good if you ask me...
 
Status
Not open for further replies.
Back
Top