Check if playing LAN

Evil Seal

Member
Reaction score
2
Hello everyone :D

I'm making a strategical trading card game for Wc3. In the game you can challange other players online with your deck that you customize by your self. I also want you to be able to play it single player on lan. The reason for this is because I want you to be able to customize your deck and play against AI bosses and then unlock more cards to use.

This game uses save codes so I don't want people to be able to cheat in single player so is there a way to check if you are playing LAN but with no other players?

Thanks :)
 

xAnaMorphine

Active Member
Reaction score
43
Well you can just defeat the player who tries to cheat on the map.

Code:
Defeat
    Events
        Player - Player 1 (Red) types a chat message containing greedisgood as A substring
    Conditions
    Actions
        Game - Defeat (Triggering player) with the message: Defeat!
 

Evil Seal

Member
Reaction score
2
Well you can just defeat the player who tries to cheat on the map.

Code:
Defeat
    Events
        Player - Player 1 (Red) types a chat message containing greedisgood as A substring
    Conditions
    Actions
        Game - Defeat (Triggering player) with the message: Defeat!

It does not work for me.

Thanks anyway.
 

Juggernaut

I don't know what to change it to
Reaction score
33
You could also check if player plays alone (slots are empty)
I am not sure whether you want to check if playing with Computer, But you could do that too.
Trigger:
  • Player1
    • Events
    • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Player 1 (Red) slot status) Equal to Is playing
      • And - All (Conditions) are true
      • Conditions
        • (Player 2 (Blue) slot status) Equal to Is unused
        • (Player 3 (Teal) slot status) Equal to Is unused
        • (Player 4 (Purple) slot status) Equal to Is unused
      • Then - Actions
        • Player Group - Pick every player in (All players) and do (Game - Defeat Picked Player with the message: You are NOT allowed to play alone)
      • Else - Actions


Then you do this for player 2 etc. But this is very simple, if you could do it a little more complicated, you could do it shorter. Because this way you have to create lots of triggers. But i hope you got the general idea.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top