I was thinking about makeing a map with save code, and was just wondering A)Is there a way to protect it from single player "Whoseyourdaddy" and B)Making it so a hero can only be loaded once, to stop duping.
Is there a way to make a trigger that iff whosyourdaddy is typed by any player, that player leaves the game with a defeat.?
Day ElvesI was thinking about makeing a map with save code, and was just wondering A)Is there a way to protect it from single player "Whoseyourdaddy" and B)Making it so a hero can only be loaded once, to stop duping.
Is there a way to make a trigger that iff whosyourdaddy is typed by any player, that player leaves the game with a defeat.?
Any and all help is accepted. Thank!!
You cannot detect when a player uses cheat codes. You can, however, detect if the player is in a single-player game or a LAN/BNet game with only one player. There is a big difference between those two because the cheat codes don't even work in a LAN/BNet game. So just defeat your players one second into the game if they aren't in a LAN/BNet game.
As for loading a hero once, that's extremely simple, and entirely dependent on how you implement the hero load/save code system. Think about it. The game doesn't even support loading a hero at all until you add code to handle that. So obviously the control is entirely in your hands.
Day ElvesDoes any one have an idea how to make the trigger that will kick anyone out of a single player play?
Make a variable Integer, for example name it to KillCheaters,
Event Elapsed time is 4 seconds Conditions (leave this alone and go to actions) Actions For each (Integer A) from 1 to 12, do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Player((Integer A))) controller) Equal to User ((Player((Integer A))) slot status) Not equal to Is unused ((Player((Integer A))) controller) Not equal to Computer Then - Actions Set KillCheaters = (KillCheaters + 1) Else - Actions Do Nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KillCheaters Less than or equal to 1 Then - Actions Player Group - Pick every player in (All players) and do (Actions) Loop - Actions Game - Victory (Picked player) (Show dialogs, Show scores) Else - Actions Do nothing
Create same trigger as this one or copy it to your map, i bet you'll kill all the singleplayers cheaters with WhosYourDaddy There are so many ways to kill singleplayers but i think you just use this simple one, its better for beginner
Here's a much easyer and bether way of kicking sibgel players;
Untitled Trigger 001
Events
Map initialization
Conditions
(Number of players in (All players controlled by a User player)) Equal to 1
Actions
Player Group - Pick every player in (All players) and do (Game - Defeat (Picked player) with the message: You can't play Sing...)
that trigger wont work... because that detects the player slot kinda thing.
if you set in the player settings (you know where the custom forces are) a thing as "user" then if there is a computer there it will bee seen as a user... something like that - ino iit doesnt work
the trigger that adds an integer up for each player in-game is probably the best you can use...
also you can edit a ".j" file where u edit the cheat codes that can be inputted into the game, but thats taking it a bit to far...
to detect whether someone has loaded already, just use a simple boolean variable and when some loads go