• 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.

SinglePlayer()?

Status
Not open for further replies.
Level 2
Joined
Aug 23, 2006
Messages
7
Hey, I was wondering if there is some way to detect through triggers if the game is singleplayer or not? I need to do this to prevent cheating in my rpg so that people can't just greedisgood, get a bunch of gold, save their hero, and play online.

Also, i'm a returning member of hiveworkshop, but I remember it being called wc3 campaigns. What happened?
 
Level 9
Joined
Jan 8, 2008
Messages
357
to detect number of players u can use the following trigger:

INTEGER COMPARISON
if (game - number of players) equal to 1
then do anything

To prevent ppl to use greedisgood, i usually use the following trigger inside my map

EVENT
every 5 seconds

CONDITION
player golds greater than 5000

ACTIONS
game - defeat player 1 with the text : Are you opening a bank? Store so much golds for what?

haha!
 
Level 11
Joined
Aug 25, 2006
Messages
971
wd40bomber7: That trigger won't work: Warcraft III will not detect cheatcodes (except to implement them) when entered as chat messages.

[off-topic] ~ Thread moved from Map Development to WEHZ.
I could have sworn it did. I thought I checked a while back. Let me see...

Edit: Hmm, you were correct. I could have sworn... Oh will.
 
Level 7
Joined
Feb 25, 2007
Messages
286
That or you can do it the GUI way and do
  • Events:
  • Player 1 red chats Greedisgood
  • Conditions:
  • Actions:
  • Unit - Kill triggering units hero
  • game - defeat player 1 red with message DONT USE CHEATS!!
Even though hvo-busterkomo's way is faster and less triggers, not many people here know how to use jass and where to put it.
 
Level 11
Joined
Aug 25, 2006
Messages
971
That or you can do it the GUI way and do
  • Events:
  • Player 1 red chats Greedisgood
  • Conditions:
  • Actions:
  • Unit - Kill triggering units hero
  • game - defeat player 1 red with message DONT USE CHEATS!!
Even though hvo-busterkomo's way is faster and less triggers, not many people here know how to use jass and where to put it.

I suggested exactly the same thing in the above, but I was corrected that cheats are undetectable as chat commands.
 
to detect number of players u can use the following trigger:

INTEGER COMPARISON
if (game - number of players) equal to 1
then do anything

To prevent ppl to use greedisgood, i usually use the following trigger inside my map

EVENT
every 5 seconds

CONDITION
player golds greater than 5000

ACTIONS
game - defeat player 1 with the text : Are you opening a bank? Store so much golds for what?

haha!

They can still use it. And I've gone up to 70,000 gold in an RPG without cheats. (Just about ~2,300 kills)
 
Level 7
Joined
Feb 25, 2007
Messages
286
The way I did it doesn't detct the cheat it detects what they say no? Then it should ban them from the game. Anyways if you want you could try and make a GUI trigger decting how many people are in the game itself and kick the kid if its only 1 w/ or w/o computers. It'd probably need functions for computer detection and possibly GUI possibly but probably JASS for the player detection aswell
 
Level 4
Joined
Jan 17, 2008
Messages
65
The way I did it doesn't detct the cheat it detects what they say no? Then it should ban them from the game. Anyways if you want you could try and make a GUI trigger decting how many people are in the game itself and kick the kid if its only 1 w/ or w/o computers. It'd probably need functions for computer detection and possibly GUI possibly but probably JASS for the player detection aswell


I would prob'ly never play your game if you kicked me for trying to play it single player.

I dont' know how save codes work- but i suggest simply deactivating the save system if the person plays it single player- i can't host games so if no one is hosting your game i will still want to be able to play it! and if i can't play it on my own, even though i can't save, i'm not going to bother letting it take up space 'til someone hosts it =/
 
Level 7
Joined
Feb 25, 2007
Messages
286
I would prob'ly never play your game if you kicked me for trying to play it single player.

I dont' know how save codes work- but i suggest simply deactivating the save system if the person plays it single player- i can't host games so if no one is hosting your game i will still want to be able to play it! and if i can't play it on my own, even though i can't save, i'm not going to bother letting it take up space 'til someone hosts it =/

Go ahead haven't you noticed most RPG's DO KICK U OUT if ur on single? Why so you can't cheat!! What I say to people that dont play multi and only single is get some internet and play multiplayer!!!
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
To detect if a game is single player or not, simply count the number of human players.

There obviously has to be more than 1 for the game to be multiplayer.

Also kicking people out if its Single Player is a "noob" way of handling the problem. The more mature way (that all good rpgs do) is to simply disable the save system. Also most RPGs that do that get ignored by this site as they can not be tested easilly.
 
Status
Not open for further replies.
Top