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
612
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
612
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.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top