Hello everybody! i'm currently learning how to use triggers and I have a problem creating one. My objective with the trigger I'm creating, is to make it so when somebody enters a secret code, he will be able to build a unit that nobody can. Can somebody please tell me how to do it? Do I have to create a custom requirement?
The event you are looking for is called "Chat Message".
Shawn is right. I wonder though, is it possible to enter a custom cheat code without actually letting people read what you typed for the cheat to work? Because as far as I know, you can't send a chat message that will only be displayed to you, or even not displayed at all in the chat box. Maybe we can replace the cheat text by some placeholder though, like "[hidden cheat]" so that people will know you cheated but won't see what you really typed.
Shawn is right. I wonder though, is it possible to enter a custom cheat code without actually letting people read what you typed for the cheat to work? Because as far as I know, you can't send a chat message that will only be displayed to you, or even not displayed at all in the chat box. Maybe we can replace the cheat text by some placeholder though, like "[hidden cheat]" so that people will know you cheated but won't see what you really typed.
Yes! I think it is possible if your cheat starts with a " / ". But none of you really helped me, so I shall attempt to explain further.
I have created an uber unit you see, that I want it to be only be able to be created by me, after entering a cheat code that only I know.
So, what do I have to do to make it possible? Do I have to create a custom requirement and link it to the trigger?
If I have to, how would I go about doing it?
Simply create a new trigger with the Event = Chat Message. Will be something like "Game - Player Any Player types a chat message containing "/supercheater", matching Exactly". Then set the actions to Create Unit for the player or whatever you are doing.. It really is more simple than you are making it out to be.
Simply create a new trigger with the Event = Chat Message. Will be something like "Game - Player Any Player types a chat message containing "/supercheater", matching Exactly". Then set the actions to Create Unit for the player or whatever you are doing.. It really is more simple than you are making it out to be.
I managed to do the chat event, but I'am unable to find the "create unit" thing. Also, if I make it so the chat event disables tech tree restrictions, it says "disable tech tree restrictions for player 1" how do I make it so that the action only applies to the person entering the cheat?
Events
Game - Player AnyPlayer types a chat message containing "/icheatlikeanoob", matching Exactly.
Actions
Unit - Create 1 UberUnit for player (Triggering Player) at ThePointWhereYouNeedItToSpawn facing WhatEverYouWant (No options)
If you are sure to be the host (player 1), you can change the event to be "Player 1 types a chat message", so that nobody else but the player 1 (which should be you) can spawn the unit. The player "Triggering Player" in the Action can be found in the Functions tab when modifying the field properties.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello everybody! i'm currently learning how to use triggers and I have a problem creating one. My objective with the trigger I'm creating, is to make it so when somebody enters a secret code, he will be able to build a unit that nobody can. Can somebody please tell me how to do it? Do I have to create a custom requirement?
Thanks in advance!
The event you are looking for is called "Chat Message".
I assume you mean they type it since you didn't specify anything different.
Shawn is right. I wonder though, is it possible to enter a custom cheat code without actually letting people read what you typed for the cheat to work? Because as far as I know, you can't send a chat message that will only be displayed to you, or even not displayed at all in the chat box. Maybe we can replace the cheat text by some placeholder though, like "[hidden cheat]" so that people will know you cheated but won't see what you really typed.
Yes! I think it is possible if your cheat starts with a " / ". But none of you really helped me, so I shall attempt to explain further. I have created an uber unit you see, that I want it to be only be able to be created by me, after entering a cheat code that only I know. So, what do I have to do to make it possible? Do I have to create a custom requirement and link it to the trigger? If I have to, how would I go about doing it?
@Ezera: Go
Requirements are only used in data afaik.
Simply create a new trigger with the Event = Chat Message. Will be something like "Game - Player Any Player types a chat message containing "/supercheater", matching Exactly". Then set the actions to Create Unit for the player or whatever you are doing.. It really is more simple than you are making it out to be.
@Shawn91210: Go
I managed to do the chat event, but I'am unable to find the "create unit" thing. Also, if I make it so the chat event disables tech tree restrictions, it says "disable tech tree restrictions for player 1" how do I make it so that the action only applies to the person entering the cheat?
Thank you, and sorry for causing so much trouble.
@Ezera: Go
Events
Game - Player AnyPlayer types a chat message containing "/icheatlikeanoob", matching Exactly.
Actions
Unit - Create 1 UberUnit for player (Triggering Player) at ThePointWhereYouNeedItToSpawn facing WhatEverYouWant (No options)
If you are sure to be the host (player 1), you can change the event to be "Player 1 types a chat message", so that nobody else but the player 1 (which should be you) can spawn the unit. The player "Triggering Player" in the Action can be found in the Functions tab when modifying the field properties.