• 🏆 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!

[Trigger] Forbid SinglePlayer Trigger

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
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
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
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 !
 
Level 11
Joined
Feb 14, 2009
Messages
884
Int is an integer variable with a starting value of 0. Have you done that, and it doesn't work?
 
Level 11
Joined
Feb 14, 2009
Messages
884
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

  • Demo.w3x
    17.2 KB · Views: 47

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
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.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
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.
 
Level 11
Joined
Feb 14, 2009
Messages
884
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.
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
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:eek:k 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?
 
Level 7
Joined
Apr 13, 2008
Messages
183
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 :|
 
Level 15
Joined
Mar 31, 2009
Messages
1,397
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
 

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,531
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
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
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.
Top