HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Text trigger question (when someone types text, information appears on-screen)

08-24-2003, 06:09 PM#1
Fragmentation
I am gonna do triggers where lets say a player types "-help"

text info appears giving the player who typed -help a submenu to show the player what he/she has to type to see info on other things

so when the player types "-help", text will appear showing this

type -creep for creep location and info
type -town for your base info

etc.

but I realized the way I was gonna do it, I had to make separate triggers for each player ( my map can have up to 10 players )

so basically thats alot of triggers if I do events saying "player 1 red types a chat message containing -help"

and I have to do that for each and every player and on top of that I have to do the same triggers again for each and every player if they were to type -creep or -town etc.

anyone know of an easier way to go about this, as in lesser triggers and less work for me?

I tried thinking up a player group work around, but I am stumped

thanks for any help
08-24-2003, 07:09 PM#2
Pen²
Hmm, why do you use a chatting message system?
If you really want a that large help file, then you really should use dialogs! They are a little bit more complicated to trigger and you will need some variables, but it's more stylish and that's everything that is important ... ;)

Your question: There is only the way to do it with arrays. Well actually I don't really know how to use array variables, so I can't help you.
Why don't you make those 30 triggers? With copy and paste you are done in 10 minutes lately ...:ggani:
08-24-2003, 07:13 PM#3
Fragmentation
dialogs?

you mean the dialog button triggers and stuff?

I will probably try out this dialog stuff if anyone can answer me this

do I need to know JASS to work dialogs??
08-24-2003, 07:18 PM#4
Pen²
Not really.

Do you want an introduction in using dialogs?
08-24-2003, 07:19 PM#5
Plasma[Blade]
No, you can do it easily through triggers. All you need to do is create Dialog Button variables for the buttons, then create dialog variables for the dialogs you want, then use triggers to make the dialogs pop up. That should be easy enough, yes?
08-24-2003, 07:20 PM#6
Bolt
There's a dialog menu tutorial in the tutorial section.
08-24-2003, 07:23 PM#7
strung
if you want a chat base system there is a easy way to make 1 trigger for 12 people.
Make every player in the event and the actions will say triggering player.
That won't be as hard as setting up alot of button variables.
08-24-2003, 07:27 PM#8
Pen²
Quote:
Originally posted by strung
if you want a chat base system there is a easy way to make 1 trigger for 12 people.
Make every player in the event and the actions will say triggering player.
That won't be as hard as setting up alot of button variables.
Well, sometimes people don't see the forest because of the trees ... :ggani:
08-24-2003, 09:45 PM#9
Fragmentation
Quote:
Originally posted by Pen²
Well, sometimes people don't see the forest because of the trees ... :ggani:


yea I hate it when people just don't bother typing -help even though its shows "please type -help" as clear as day

then later on in the game, they get a fit saying they don't know their mission
08-25-2003, 06:57 AM#10
Dead-Inside
Hey Nightblade, are you Download??

Anyway, since you can't think this far yourself, here it goes:

Events-
Player 1 types -help as an exact match
Player 2 types -help as an exact match
Player 3 types -help as an exact match
Player 4 types -help as an exact match
Player 5 types -help as an exact match
Player 6 types -help as an exact match
Player 7 types -help as an exact match
Player 8 types -help as an exact match
Player 9 types -help as an exact match
Player 10 types -help as an exact match
Actions-
Display Text-Message for (Triggering Player): YourTextHere, with the submenus.

Then you make another of these, and keep displaying to triggering player.

All others who've helped in this thread, sucks. It also sucks reading big texts in dialogs. And no, you need absolutely no knowledge of JASS to do either of these. You can also pan camera to different regions while text is displaying.

Regards
Dead-Inside
08-25-2003, 11:44 AM#11
Pen²
What's your problem with using dialogs? You can easiely type 4 or 5 long sentences in one dialog without problems.
08-25-2003, 01:21 PM#12
Plasma[Blade]
Dialogs are much easier to use, and they're easier to organize and such, but I've heard that you have to make seperate triggers for each player, because of a bug which causes Dialogs to screw up with "Triggering Player". That might just be a problem with dialog buttons, though.

Anyway, here's a short summary Trigger of what you need to do with dialogs:

Code:
Events
  Player 1 types a chat message containing -help as an exact match
  Player 2 types a chat message containing -help as an exact match
  Player 3 types a chat message containing -help as an exact match
  ...etc
Conditions
Actions
  Dialog - Show [color=red][Dialog][/color] for (Picked Player)

If that doesn't work, you'll have to do a trigger like this for each player...

Code:
Events
  Player - Player 1 types a chat message containing -help as an exact match
Conditions
Actions
  Dialog - Show [color=red][Dialog][/color] for Player 1 (Red)

You'll have to create Dialog variables for each Dialog you want, which should be pretty simple.

Now, you have to make a trigger that fires before this, with the "Dialog - Change Title" trigger, which can be used near Initilization. Basically, the title is what text will come up in your Dialog, before the buttons.

Now, if you want, you can make the buttons. Here, you'll need to create a Dialog Button variable for every Dialog button you want, then in a trigger that fires near the start, use the Dialog - Create Dialog Button trigger, and make your button, then simply use the Set Variable trigger, "Set [Dialogbuttonname] = (Last Created Dialog Button), and you'll be home free to arrange them easily later on.

Now, to make another Dialog box pop-up when a button is clicked, just use a trigger like this:

Code:
Events
  Dialog - A button is clicked for Dialog
Conditions
  (Clicked Dialog Button) equal to [color=red][Dialog Button][/color]
Actions
  Dialog - Show [color=red][Other Dialog][/color] for Player 1 (Red)

And there you go, that should answer most of the questions you have.
08-25-2003, 02:00 PM#13
Pen²
One thing more: The dialogs won't change their horizontal size when you insert longer tiles. What you have to do is using the return key to prevent the dialog from displaying text over the entire screen. (Use the |n code to replace the return key if you change the dialog title by 'set variable' or 'concetanate strings')
08-25-2003, 05:26 PM#14
Dead-Inside
Well, [FLAME CENSORED] , I wouldn't like massive admounts of information displayed in dialogs.

It also has one HUGE drawback, you are unable to play while viewing one. Another one is that you can't move the screen along to show places. Actually you can but the player with the dialog wont see much.
So, basicly, it's really sucky to use dialogs for this purpose. However, I don't degrade dialogs, I had masscontrol in another map of mine use dialogs. It was sweet! Best masscontrol I've seen, no joke :).

Regards
Dead-Inside
08-25-2003, 06:04 PM#15
LiableSu5pect
why dont oyu put all the help information in the quest menu? ive seen it done and it comes out better than dialog on the screen that way players that need help can get it easily