| 12-18-2006, 03:25 AM | #1 |
In WEU there is a function Trigger: Game - Display to (Player Group), at offset (x, y) for x seconds the text: TextOn a related note, is there a way (in custom script or through GUI) to play a sound for a specific player? I need to use the error sound. |
| 12-18-2006, 04:30 AM | #2 |
Can't you convert it into JASS? Edit: Ah yes, pardon me. |
| 12-18-2006, 04:51 AM | #3 |
I don't have WEU, nor can I get it because I'm on a Mac. All I need is for someone to take all of two seconds to open up WEU, make that action, convert it to custom text, and post it here. Or, if someone who knows JASS well can just post it off the top of their head, that would work. |
| 12-18-2006, 08:05 AM | #4 |
You could just try converting the regular GUI action without the coordinates and see where that gets you. It gets you here, and it's easy to modify this function to also take the x and y coordinate as parameters. |
| 12-18-2006, 11:58 AM | #5 |
You can get WEU... |
| 12-18-2006, 01:30 PM | #6 |
Pyrogasm, when you want to play a sound for a specific player, you must perform JASS:GetLocalPlayer()==p //p is an argument But not that way. For this one, it's safe. ~AW |
| 12-18-2006, 08:04 PM | #7 |
JASS:function Trig_Test_Actions takes nothing returns nothing call DisplayTextToPlayer( Player(0), 0, 0, "TRIGSTR_002" ) endfunction //=========================================================================== function InitTrig_Test takes nothing returns nothing set gg_trg_Test = CreateTrigger( ) call TriggerAddAction( gg_trg_Test, function Trig_Test_Actions ) endfunction It's what I got...I just download WEU to test it out yesterday ![]() Just edit the TRIGSTR_002 to your text message, the offset stuff and the player. I didn't find a player_group display message action though. |
| 12-19-2006, 12:16 AM | #8 | |
Quote:
I would have tried to convert just a regular message and then decipher it, but honestly understand very little JASS, so I thought I would have been in way over my head. Next time I'll try something of that sort first. |
| 12-19-2006, 12:55 AM | #9 |
So...does the converted JASS script I gave work or no? |
| 12-19-2006, 01:10 AM | #10 |
Sort of. The problem was that I needed to display it to TriggerPlayer(), not Player(whatever the player number is), so I had to tweak it. I ended up using this: JASS:call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0, 0, 3.00, "|cffffcc00Invalid Cast.") Archworm, I don't get what you're saying. I tried things similar to this: JASS:call PlaySoundBJ( GetLocalPlayer(GetTriggerPlayer()) gg_snd_Error ) EDIT: I've run into a problem: If I set the x offset to be anything more than 2, the text doesn't show. If I set it to 2, the text shows on the far right of the screen, and if I set it to 1, it displays on the left. Also, if I show a new message directly after it without an offset (just using the GUI action), it will be displayed at the offset of the previous message. Odd. |
| 12-19-2006, 02:43 AM | #11 |
The x and y values are real values, not integers. That's why the offsets are bigger than you'd expect. Even when you move the text, it's still a text message so it will get moved up when you display another. If you don't want it to move, you'd probably have to figure out some system where whenever you probably want to display text that you would clear the screen, display the text, and then display another text message in the spot you want it to be in. If that fails, you can always get the target X/Y of the screen and create floating text accordingly. |
| 12-19-2006, 05:19 AM | #12 |
Ok, so the text works fine now. The problem still remains with the sound, though. If someone could please explain it to me (or add on to what Wyrmlord said), I would greatly appreciate it. I'm trying to play the Error.wav sound for only the triggering player, not all players. |
| 12-19-2006, 06:00 AM | #13 |
JASS:if GetLocalPlayer() == desiredplayer then call StartSound(sound) endif |
| 12-19-2006, 12:02 PM | #14 | |
Quote:
|
| 12-20-2006, 04:02 AM | #15 |
Sorry Vex, I can't get the files from WEU.exe because the only WEU downloads are the installer for it (weusetup120.exe), which I can't extract files from. If you could please post those files here, PM them to me, or email them to me at [email protected] I would greatly appreciate it. Hopefully I can figure it out from there. Question: Can I really extract files from .exe's with an MPQ extractor? I'm using Diablo MPQ Tools. I also tried using MPQ2K, but it couldn't extract it either. |
