| 02-02-2006, 11:26 PM | #1 |
Is there anyway to make an event which would check if red types a message in general, because for my map I need it so he can choose any number of his choice, and I don't see anything which allows me to do this in the Event - Chat Message trigger. Thanks |
| 02-02-2006, 11:33 PM | #2 |
Here it is Trigger: Player - Player 1 (Red) types a chat message containing (text) as An exact matchA great man one said, "Give rep to those who help you" *wink wink* |
| 02-02-2006, 11:38 PM | #3 |
I think you should try Trigger: Player - Player 1 (Red) types a chat message containing (<Empty String>) as An exact matchBe wary, for some reason I've heard this may cause server splits. If that doesn't work and you're feeling lazy, try this |
| 02-02-2006, 11:53 PM | #4 | |
Quote:
"text" as the parameter would be anything typed? |
| 02-02-2006, 11:58 PM | #5 |
well actually empty string will do anything, but it can be buggy. WEU comes with a player types any string message event but I can't seem to figure out how to actually get that string message. If it's single player I think John's way might work. |
| 02-03-2006, 01:28 AM | #6 |
Well this code was designed for only one person input, this is what it looks like, give me some feedback please: ![]() |
| 02-03-2006, 05:18 AM | #7 |
I'm sorry to say that that is a horridly bad trigger. Trigger: If you don't ever use the trigger in the map after it sets PeriodLength, then I suggest that you use: |
| 02-03-2006, 11:00 AM | #8 |
I don't see why that should make the trigger "horridly bad". It's just inefficient, but it should work. Besides, your trigger doesn't cap the game time to 60 minutes like his. |
| 02-03-2006, 11:54 AM | #9 | ||
Quote:
And another man said, that asking for rep in every post sucks, even though you should. Quote:
Because you use as "An exact match", it will only work if the text contains 1, 2, 3, 4, 5, 6, 7, 8, 9 or 10, which means that it wouldn't work with higher numbers. I would use this: |
| 02-03-2006, 07:32 PM | #10 |
GAMELENGTH and PERIODLENGTH are two different variables. I have other checks in other triggers, heres the whole thing: ![]() and ![]() EDIT: PC, I don't know any type of customscript/JASS to be doing that so I used Turn off this trigger, what's wrong with it? :o Anitarf, how could I make my triggers more efficient? :P |
| 02-03-2006, 08:58 PM | #11 | |
Quote:
custom script: call DestroyTrigger( GetTriggeringTrigger() ) |
| 02-03-2006, 09:01 PM | #12 |
How is that better than Turn Off trigger? |
| 02-03-2006, 09:05 PM | #13 |
Well, it destroys the trigger, so it's not in memory any more... It has been reported that destroying single-use triggers once they are no longer needed improoves map performance, especially in the cases of very long initialization triggers. |
| 02-03-2006, 09:08 PM | #14 |
Alright, thank you. |
