Player and integer variables failed me

Moon_Raven

New Member
Reaction score
8
Ok, so I don't understand why doesn't this work?
I wanted to make a cheat system so I could play jokes on my friends. So What basically I wanted to do is make them safer. So I made a few cheats that work if a player types a message something happens and they are initially off. So I noticed that if I don't come uo with something I would have to put events for ALL players since I don't know in what slot I am PLUS the condition that PlayerName is "Moon_Raven". So I thought of making something like this:
Trigger:
  • Cheats On
    • Events
      • Player - Player 1 (Red) types a chat message containing #include Veljko as An exact match
      • Player - Player 2 (Blue) types a chat message containing #include Veljko as An exact match
      • Player - Player 3 (Teal) types a chat message containing #include Veljko as An exact match
      • Player - Player 4 (Purple) types a chat message containing #include Veljko as An exact match
      • Player - Player 5 (Yellow) types a chat message containing #include Veljko as An exact match
      • Player - Player 6 (Orange) types a chat message containing #include Veljko as An exact match
      • Player - Player 7 (Green) types a chat message containing #include Veljko as An exact match
      • Player - Player 8 (Pink) types a chat message containing #include Veljko as An exact match
    • Conditions
      • (Name of (Triggering player)) Equal to Moon_Raven
    • Actions
      • Set Moon_Raven_Cheater = (Player number of (Triggering player))
      • Trigger - Turn on (CrashGame)

And here is a sample of a cheat trigger:
Trigger:
  • CrashGame
    • Events
      • Player - (Player(Moon_RavenCheater)) types a chat message containing Veljko je pametan as An exact match
    • Conditions
      • (Name of (Triggering player)) Equal to Moon_Raven
    • Actions
      • Custom script: call CrashGame()

But I can't set player index to this integer variable! And I can't do the similar thing with player variables either! Why the hell I can't do that?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
You need to add the event from another trigger to be able to use variables in them ;)
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
king, his problem is that it doesn't run at all, that's different. Like Komaqtion said, use Add event.

But you can also just add 12 events...
 

Moon_Raven

New Member
Reaction score
8
Yeah, I know I could add 12 events, but that is something I want to avoid.
And kingkingyyk3, as azlier said, you want your crashes to be as efficient as possible :D
JASS:
function CrashGame takes nothing returns nothing
    call Player(-1)
endfunction
:)
 
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