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

[Trigger] Need help with a trigger to recognize owner of unit

Status
Not open for further replies.
Level 2
Joined
May 18, 2018
Messages
18
So im making a multiplayer map that has a single player option but with anticheat and i got anticheat for most of them, and im kinda stuck on the whosyourdaddy

Basically the thing is that i dont want the Triggers to Defeat the player on using cheats, i want them to execute a script that skips defeat screen and removes them from the game

Example (anti greedisgood)
  • Events
    • Player - Player 1 (Red)'s Current gold becomes Greater than or equal to 500000.00
    • Player - Player 1 (Red)'s Current lumber becomes Greater than or equal to 200.00
  • Conditions
  • Actions
    • Game - Display to (All players) the text: |c00FF0000=== CHEAT...
    • Unit - Pause all units
    • Wait 10.00 seconds
    • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
    • Custom script: call RemovePlayer(GetTriggerPlayer(), PLAYER_GAME_RESULT_DEFEAT )
    • Custom script: call EndGame(true) // Skips to game result screen
    • Custom script: endif
so thats the script that picks the player and then just kicks him out after 10 seconds
now i set up the classic anti whosyourdaddy where you got an unit attacking another high hp regen unit so it cant be killed unless whosyourdady is activated, but now im having trouble editing the script to instead of getting localplayer / triggeringPlayer to getting owningplayer of killing unit so, if anyone could take their time and share their advanced wisdom, i would apprecitate that a lot :) in case this has been posted somewhere im sorry i really didnt find it tried search
 
Level 9
Joined
Apr 23, 2011
Messages
527
Well, you can always just detect if the player types such cheats...

Fire the trigger if the high hp regen unit dies and do something like this:
  • Custom script: call RemovePlayer(GetOwningPlayer(GetKillingUnitBJ()), PLAYER_GAME_RESULT_DEFEAT )
  • Custom script: call EndGame(true) // Skips to game result screen
 
Level 2
Joined
May 18, 2018
Messages
18
Well, you can always just detect if the player types such cheats...

by that you mean something like this?
  • Player - Player 1 (Red) types a chat message containing Whosyourdaddy as An exact match
this has been over the years many times asked here and no, direct message detection never works as cheats arent written as message they are strings, so that doesnt work, even if i put the message containing "cheat enabled" or something so.... yea idk

but yea that custom script worked for that so thanks :)
 
Level 13
Joined
Oct 12, 2016
Messages
769
I've always preferred anti-cheat systems that make cheats redundant and useless in a comical way, but didn't kick the player.

Like:
greedisgood? set resources to 0.
whosyourdaddy? upgrade all units to have + 10,000 hp, +1000 hp regen, -100 damage, and spell immunity
iseedeadpeople? blank out the map with clutter.
thereisnospoon? disable all spells.

Cheats are only usable in single player anyways.
 
Level 2
Joined
May 18, 2018
Messages
18
Why is it wrong to cheat in a single player map :-/
well in maps like The Sunken City or The Warden and etc, the whole enjoyment or point of the map is to not be able to tralala through. Like sunken city, the fog is a big impliment because there are those secret areas where you walk through trees and get a shadow crystal, iseedeadpeople = no more puzzle hidden in shadow. Whosyourdaddy?? one shot bosses to ruin challanges. Greedisgood? oh yea 100000 shadow crystals. There is no spoon?? well thats only a slightly helpful cheat but still you get my point

the map im making is an adventure raid type map that is playable on single player, and thats the point of anti cheat, so that people cant just roll through, it would ruin the entire work
 
Level 2
Joined
May 18, 2018
Messages
18
I've always preferred anti-cheat systems that make cheats redundant and useless in a comical way, but didn't kick the player.

Like:
greedisgood? set resources to 0.
whosyourdaddy? upgrade all units to have + 10,000 hp, +1000 hp regen, -100 damage, and spell immunity
iseedeadpeople? blank out the map with clutter.
thereisnospoon? disable all spells.

Cheats are only usable in single player anyways.
HONESTLY THO, THAT IS AN AMAZING IDEA i didnt even think about doing something like that lol... its a "one hero" based map so yea i could just f*ck around with his stats instead of just terminating the instance that is briliant my dude, rep up for that
 
Level 11
Joined
Jun 2, 2004
Messages
849
There's typically two reasons people cheat in single player games:

1) They're new to video games in general and don't realize their ruining their own experience.
2) The game is frustrating and they cheat to get past annoying bits.

Neither are really things one should prevent as a designer. The former is a phase people just get over eventually, and the latter actually improves the player experience.

I've played several games with anti-cheat mechanics that made the whole experience far worse since I was attempting to just ignore or bypass a tedious part of the game, yet it insisted with all its might I do it anyway. Not fun.
 
Status
Not open for further replies.
Top