| 12-15-2003, 02:53 AM | #1 |
i couldnt really search for this cuz i dont know what u would call it. i mean, i tried best i could but it was fighting a losing battle - in my case anyway. so to the point: i am working on a help system for my map that is accessed via pure text messaging. ex: there will be an initial command saying something like for more info or help - type .help . then when a player types .help , he would get more help options to choose from. but this where my problem arises at. is there a way to perform a "generic" player trigger? like - "a" player enters .help , display the next information to triggering player? i want this to explain the whole game best i can, which means it would have to be a moderate length. but i do NOT want to have to make each trigger 500 million times becuz i would have to have player red enters w/e, player blue enters w/e, etc., etc. please help me out here, you time and efforts are always appreciated. thank you. |
| 12-15-2003, 03:05 AM | #2 |
You don't need to make each trigger 500 times. Triggers can have multiple events. A trigger goes off when ANY of its events occur -- not all of them have to occur at once. To cut down your triggers a little further instead of having it detect ".help" have it detect "" (empty) as a substring, and then just have 1 condition, a string comparison to check if the entered message is the string you want. |
| 12-15-2003, 03:17 AM | #3 |
While some trigger events do have the ability to be "generic", I'm afraid the text message one isn't. As he said, you only need one event to happen to make the trigger work, so just do this: Event- Player 1 enters .help as an exact match Player 2 enters .help as an exact match Player 3 enters .help as an exact match Player 4 enters .help as an exact match Player 5 enters .help as an exact match Player 6 enters .help as an exact match Player 7 enters .help as an exact match Player 8 enters .help as an exact match Player 9 enters .help as an exact match Player 10 enters .help as an exact match Player 11 enters .help as an exact match Player 12 enters .help as an exact match Conditions- Actions- Display the text This is to help you for Triggering Player Tada! I realize that this is what you were trying to avoid, but when it comes to text messages, it's what has to be done. Don't be lazy. If you're willing to spend hours/days/weeks/months/etc. making a map, then why have a problem with taking just one minute longer with a display message trigger? Hope I could help. Good luck! :D |
| 12-15-2003, 04:39 PM | #4 |
Why bother with that trigger when you can do just what was suggested above. Empty set is just not typing anything in and just excepting the blank. Events: Player - Player 1 (Red) types a chat message containing <Empty String> as A substring Player - Player 2 (Blue) types a chat message containing <Empty String> as A substring Player - Player 3 (Teal) types a chat message containing <Empty String> as A substring Actions: If - Conditions (Entered chat string) Equal to .help Then - Actions Game - Display to (All players matching ((Matching player) Equal to (Triggering player))) the text: I'l help you out yo... Else - Actions Do nothing This will put all your trigger into just this one trigger. Just add as many If-Then-Else actions you need. |
| 12-15-2003, 07:40 PM | #5 |
k that last thing with matching/triggering is what i was looking for. thanks all |
| 12-15-2003, 08:21 PM | #6 |
You wouldn't use the empty string idea unless you absolutely had to because then every single time a player types in any message, the trigger runs and checks the message, even if they just hit enter with no text at all. This creates lag, and lag is something we would want to avoid. God, why is everyone always against what I suggest? I realize that like any other human, I'm capable of being wrong, but I know I'm right with this one. That method creates lag because it would run every single time someone enters a message. It may not execute its actions, but it will still run and check the conditions, which would create lag. Unless you absolutely have to use that method, you should use "exact match" events to limit the amount of times the trigger is run. This prevents lag. But, hey, do whatever the heck pleases you. :nono: |
| 12-15-2003, 08:32 PM | #7 |
I have an eayer way to set that up, add this to the ilitalization Run integer A loops from 1-10 Add event "player index(integer A) types a message ".help" as an exact match to Help trigger <gen>. tadah! no need to copy-paste 10 times, be sure to delte the initalization trigger after startup though, it will end up causeing lag. |
| 12-15-2003, 08:54 PM | #8 |
dan im sorry if i somehow offended u when i said i liked the last one, sorry. if i notice the lag gets really bad, then ill prolly changeit. i just dont wanna right now cuz i am a very lazy person. |
| 12-15-2003, 08:59 PM | #9 | |
Quote:
That's cool, Hunter, thx. :D I think I'm gonna add that to my map...well...I already did it the first way I mentioned, so I suppose it'd be pointless to do that now. However, I'll make sure to do that from now on. Thx. :ggani: |
| 12-15-2003, 09:05 PM | #10 |
I am here to serve... and to destroy!! mwhahahaha |
| 12-16-2003, 03:13 PM | #11 |
noooo spare me |
