Text Message

TaCoChris

New Member
Reaction score
1
Hey guys!

I want to create a "Text - Message"
Just like when you hit a ward with an spell, and i says:
"Unable to target wards."

So when a unit pick up an item, it says "Your not allowed to pick up any items"
- But not with floating text or Game Text.

I've seen all theese msg's in
-> Advanced
-> Game Interface
Text - Message - 'Unable to target wards.'

Hope you understand my question!
Thanks
- Chris
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
There's a system somewhere called "SimError". It should do what you're looking for, and it doesn't seem too hard to configure either.
 

TaCoChris

New Member
Reaction score
1
1.PNG

I get theese errors while trying to "Enable".
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Well, for a start, go to the Sound Editor, choose Internal > Sound > Interface > Error.wav, right-click it and choose Use as Sound.

Then you can just copy and paste this part of the code into your map.
JASS:

function SimError takes player ForPlayer, string msg returns nothing
    set msg="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00"+msg+"|r"
    if (GetLocalPlayer() == ForPlayer) then
        call ClearTextMessages()
        call DisplayTimedTextToPlayer( ForPlayer, 0.52, 0.96, 2.00, msg )
        call StartSound( udg_Error )
    endif
endfunction
 

WolfieeifloW

WEHZ Helper
Reaction score
372
You don't have to do any of that.
Just simply copy this script into your map (Instructions are in the script itself).
Then, just call upon it with a custom script:
Code:
Custom script:   call SimError(GetOwningPlayer(GetTriggerUnit()), "SimError works!")
 

TaCoChris

New Member
Reaction score
1
Well, i had copied the script before, where i got the errors.
I tried to copy it again, but it still give me all the errors.

Dont know if its a way to huge step for me, to learn Jass.
But i got no clue about it, so i just doing what your saying, with no clue to figure out why it dosnt work.

- Chris
 

TaCoChris

New Member
Reaction score
1
Ive only copied the link you send in, the "SimError" jass.
I've only got WE. No NewGen, no JASSHelper.
- Are they need'd?
I only try to get the "error" msg. when i pick up an item.

Post my trigger?
- My trigger where i use the:
call SimError(GetOwningPlayer(GetTriggerUnit()), "SimError works!")
??
 

WolfieeifloW

WEHZ Helper
Reaction score
372
You need NewGen, you can get it here.
Once you get NewGen, whenever you're working with a (v)JASS script, never use the "Syntax Check" button, it's broken.

To check for compile errors, use Save (CTRL+S), and JASSHelper will come up after a few seconds if there's any errors.

And yes, that's the line I want to see, but post your whole trigger.
Go above "Events" to your trigger name, right-click, select "Copy As Text", and come back here.
Paste the code between [noparse]
Trigger:
[/noparse] tags.
 

TaCoChris

New Member
Reaction score
1
I'll DL it now.
Here is my trigger.

Trigger:
  • Ginger Boy
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set GingerInt[1] = (Player number of (Triggering player))
      • Set GingerInt[2] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • GingerInt[1] Equal to 1
              • GingerInt[1] Equal to 2
              • GingerInt[1] Equal to 3
              • GingerInt[1] Equal to 4
              • GingerInt[1] Equal to 5
        • Then - Actions
          • Set GingerInt[1] = 1
        • Else - Actions
          • Set GingerInt[1] = 2
      • Set GingerBoyUnitGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in GingerBoyUnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Ginger Boy
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Owner of (Picked unit)) Equal to Player 1 (Red)
                      • (Owner of (Picked unit)) Equal to Player 2 (Blue)
                      • (Owner of (Picked unit)) Equal to Player 3 (Teal)
                      • (Owner of (Picked unit)) Equal to Player 4 (Purple)
                      • (Owner of (Picked unit)) Equal to Player 5 (Yellow)
                • Then - Actions
                  • Set GingerInt[2] = 1
                  • Unit Group - Pick every unit in GingerBoyUnitGroup and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Or - Any (Conditions) are true
                            • Conditions
                              • (Owner of (Picked unit)) Equal to Player 6 (Orange)
                              • (Owner of (Picked unit)) Equal to Player 7 (Green)
                              • (Owner of (Picked unit)) Equal to Player 8 (Pink)
                              • (Owner of (Picked unit)) Equal to Player 9 (Gray)
                              • (Owner of (Picked unit)) Equal to Player 10 (Light Blue)
                        • Then - Actions
                          • Set GingerInt[2] = 3
                        • Else - Actions
                • Else - Actions
                  • Set GingerInt[2] = 2
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GingerInt[2] Not equal to 0
          • And - All (Conditions) are true
            • Conditions
              • GingerInt[1] Not equal to GingerInt[2]
        • Then - Actions
          • Set GingerPoint[1] = (Position of (Hero manipulating item))
          • Set GingerPoint[2] = (Position of (Item being manipulated))
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Item - Move (Last dropped item) to GingerPoint[2]
          • Unit - Create 1 GingerDummy for Player 11 (Dark Green) at GingerPoint[1] facing Default building facing degrees
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Raider - Ensnare (Hero manipulating item)
          • Custom script: call SimError(GetOwningPlayer(GetTriggerUnit()), "SimError works!")
          • Custom script: call RemoveLocation(udg_GingerPoint[1])
          • Custom script: call RemoveLocation(udg_GingerPoint[2])
        • Else - Actions
      • Custom script: call DestroyGroup(udg_GingerBoyUnitGroup)
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Yes, your SimError should work there once you get NewGen/JASSHelper.
Obviously change the text though :p
 

Dirac

22710180
Reaction score
147
This might be the first person that actually installs NewGen on their own with no problems or stupid questions about "How To Install It" when there's a very specific tutorial for that in the download page.

+rep for that
 

Mindless

New Member
Reaction score
4
This might be the first person that actually installs NewGen on their own with no problems or stupid questions about "How To Install It" when there's a very specific tutorial for that in the download page.

+rep for that

Well said! Not mentioning I had about twenty thousand dopey questions regarding NewGen while I installed it. And it still haven't worked...
 

TaCoChris

New Member
Reaction score
1
haha :D ! ^^.
I guess i had the same problems as everyone else, with the rtc problem and so on.
But yes, searching at this site and google helped me out :).

-And Wolfie did great help :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top