| 04-09-2005, 12:01 PM | #1 |
In my new map, I want you to be able to interact with other people to make it more realistic. But I'm not sure how to do this myself :\ I want people to say maybe 3-4 things when you select them, so no ability or anything, all you have to do is be within a certain radius of them (if that is possible) and they will say something when you click on them. Any ideas/suggestions on how to do this? |
| 04-09-2005, 03:01 PM | #2 |
The best thing would be to use JASS , gamecache and return bug. The other way would be to have multiple arrays for each character, at map initialization you set the values of every array to the speeches of the character, and when the hero gets close to them you choose a random index of the array of each character, |
| 04-09-2005, 03:12 PM | #3 |
and then play that sound. (Since you didnt finish it Vex) I think that would be the best way. |
| 04-09-2005, 04:26 PM | #4 |
Ughh, multiple arays? Is there a way just make them say one thing? I'm assuming this would be much easier... |
| 04-09-2005, 04:57 PM | #5 |
You will still need two arrays, the array for the unit and the corresponding array for the sound. |
| 04-09-2005, 08:10 PM | #6 |
Actually when I say that they will say something, I don't mean it literally. I think I have a pretty good idea how to do it now though, so no need to worry :P |
| 04-09-2005, 11:00 PM | #7 |
Well with just some use of gamecache, jass and return bug you can do it the most easier way. But in gui the easier way is with an array for each character, |
| 04-12-2005, 01:02 PM | #8 |
I suppose, for a larger map, it would be easier to have a whole system rather than individual variable arrays for each character. Instead, you would need 3 arrays, one with all the units that can speak(unit array), a second that lists all speeches (string array) and a third that lists where in the speech array do the speeches for each of the units in the unit array begin (that way, each unit can have as many speeches as you wish). By the way, Lord Vexorian, are there any tutorials or helpful posts about the uses and advantages of gamecache compared to variables? And anything about what this return bug is? I'm looking to educate myself a bit more on these subjects... For now, I'm more interested if they can be incorporated into GUI in any usefull way, I'm not far enough yet to do all my coding in JASS. |
