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

Needing Save Code help

Status
Not open for further replies.
Level 3
Joined
Sep 6, 2004
Messages
40
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.?

Any and all help is accepted. Thank!!
 
Level 4
Joined
Feb 13, 2004
Messages
32
Day Elves said:
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.?

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.
 
Level 5
Joined
Jul 11, 2004
Messages
183
Day Elves said:
Does 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 :lol: There are so many ways to kill singleplayers but i think you just use this simple one, its better for beginner :shock:
 
Level 3
Joined
Jun 18, 2004
Messages
50
i know all this but have no time to talk about it so i say, try your self experiment and soo on.
 
Level 8
Joined
Jul 3, 2004
Messages
404
Kick player

Here's a much easyer and bether way of kicking sibgel players;

Code:
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...)
 
Level 3
Joined
Jul 16, 2004
Messages
24
nope

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

"if
loaded = false

then
create the dude
set loaded = true

else
game message "you already got a hero"
 
Status
Not open for further replies.
Top