Creating fake error messages?

insaneownage

New Member
Reaction score
6
Hi, it's been a while since I've mapped. I've searched all over but I can't find that script/system that lets you make fake error messages really easily. Can someone show me which one I'm looking for?

Thanks.
 

sidove

Member
Reaction score
22
If you mean like "Not enough gold" then go to Advanced - Game Interface - And there you start editing :)
 

Psiblade94122

In need of sleep
Reaction score
138
no i think he means soemthing like "minimum range" when casting a spell
or "You are too low leveled to use this item"

A custom error msg that would prevent a unit from taking action (detect when the animation starts, pause the unit, tell it to stop, unpause, then display the msg)

i have no idea how to do the last part >_< (which is what the topic is asking) well actually, the msg is easy, getting the error sound to play is hard
 

sidove

Member
Reaction score
22
If it's how you say then like this:

Code:
Example
Events: Unit - dies
ACtions: Sound - Play error sound
Game - Show (You are to young to die) to all player

To get the error sound press F5 in World Editor and the Sound Editor will appear from there press ctrl + f to search and type in error and the sound will appear. Then when you have found it right-click on it and press use as sound :) Hope you understand
 

XxShadyxX

I abused the rep system.
Reaction score
81
He wants the text to show where regular game errors show. Do you know how to do that?
 

Ayanami

칼리
Reaction score
288
I don't think it's possible. However, it is possible to get something close to it.

Firstly, go to your trigger editor. You would find a map icon with your map name on it. Press that at copy in this under the space below (the space that's below).

JASS:
function PlaySoundForPlayer takes player whichPlayer, sound whichSound returns nothing
if ( whichPlayer == GetLocalPlayer() ) then
call PlaySoundBJ( whichSound )
endif
endfunction


Secondly, when you want to play the sound for the player, use this.

Trigger:
  • Trigger
    • Events
    • &lt;Your event&gt;
    • Conditions
    • Actions
      • &lt;Your actions&gt;
      • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
      • Custom script: call ClearTextMessages()
      • Custom script: endif
      • Custom script: call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 2.00, &quot;&lt;Your Error Message&gt;&quot; )
      • Custom script: call PlaySoundForPlayer(GetOwningPlayer(GetTriggerUnit()), gg_snd_Error)


Hope this helps.

PS. You might want to add spacing to your error message to make it align to the right.

Glenphir
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
It's not possible to make a genuine custom error message, but you can imitate one.

There are a bunch of these scripts floating around, most called SimError.

I use this one.
 

NetherHawk

New Member
Reaction score
26
there is 1 made by vexorian. exact replica of creating an error message, but it requires you to use jass or a customscript. Create a trigger call SimError and convert it to csutom text. Paste the stuff below in. If you use jass u can use it by yourself. If you use GUI, u need to create a custom script and type in

call SimError(WHICHPLAYER,"WHATERROR")

remeber to have the " " for your error message

JASS:
library SimError initializer init
//**************************************************************************************************
//*
//*  SimError
//*
//*     Mimic an interface error message
//*       call SimError(ForPlayer, msg)
//*         ForPlayer : The player to show the error
//*         msg       : The error
//*    
//*     To implement this function, copy this trigger and paste it in your map.
//* Unless of course you are actually reading the library from wc3c&#039;s scripts section, then just
//* paste the contents into some custom text trigger in your map.
//*
//**************************************************************************************************

//==================================================================================================
    globals
        private sound error
    endglobals
    //====================================================================================================

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

    private function init takes nothing returns nothing
         set error=CreateSoundFromLabel(&quot;InterfaceError&quot;,false,false,false,10,10)
         //call StartSound( error ) //apparently the bug in which you play a sound for the first time
                                    //and it doesn&#039;t work is not there anymore in patch 1.22
    endfunction

endlibrary
 

akrep_ve_su

New Member
Reaction score
1
Excuse me; but map gives compiling error due to something written wrong in this line:
call SimError(Tossing_Player,"Cantimpale")
Tossing_Player is a Player variable refers to owner of casting unit.
Cantimpale is the rawdata name of Error mesage i am using.
What is wrong here?
 

Laiev

Hey Listen!!
Reaction score
188
if you're using gui

JASS:
call SimError(Tossing_Player,&quot;Cantimpale&quot;)


>>

JASS:
call SimError(udg_Tossing_Player,&quot;Cantimpale&quot;)
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
if tossing_player is a GUI global variable you have to write udg_Tossing_Player, all GUI variables have the prefix udg_
 

akrep_ve_su

New Member
Reaction score
1
call SimError (udg_Tossing_Player,"Cantimpale")
This is what i write but it still gives an error.
 

Jedi

New Member
Reaction score
63
1-First, open your variable editor.Make a sound variable with "error" name(without quotes)

2-Delete old SimError library, and put this in your map header.



JASS:
//**************************************************************************************************
//*
//*  SimError
//*
//*     Mimic an interface error message
//*       call SimError(ForPlayer, msg)
//*         ForPlayer : The player to show the error
//*         msg       : The error
//*    
//*     To implement this function, copy this trigger and paste it in your map.
//* Unless of course you are actually reading the library from wc3c&#039;s scripts section, then just
//* paste the contents into some custom text trigger in your map.
//*
//**************************************************************************************************
    function SimError takes player ForPlayer, string msg returns nothing
        set msg=&quot;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00&quot;+msg+&quot;|r&quot;
        if (GetLocalPlayer() == ForPlayer) then
            call ClearTextMessages()
            call DisplayTimedTextToPlayer( ForPlayer, 0.52, 0.96, 2.00, msg )
            call StartSound( udg_error )
        endif
    endfunction


3-Find a GUI trigger that works at map initialization, add this as first line:

Custom Script: set udg_error=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
 

akrep_ve_su

New Member
Reaction score
1
It is not possible to do it easier way? I play error sound via trigger Sound - Play Sound
I changed Cantimpale error message "value" (in game interface section) to the message i want to receive. And i've written exactly as:
call SimError (udg_Tossing_Player,"Cantimpale")
Tossing_Player refers to the player who owns a hero casts Toss spell as i said before. Now is there something wrong that i am doing here? I really would like to complete the trigger this way (if possible) rather than starting an entire new one; especially one contains codes that i don't understand =)
 

tooltiperror

Super Moderator
Reaction score
231
It is not possible to do it easier way? I play error sound via trigger Sound - Play Sound
I changed Cantimpale error message "value" (in game interface section) to the message i want to receive. And i've written exactly as:
call SimError (udg_Tossing_Player,"Cantimpale")
Tossing_Player refers to the player who owns a hero casts Toss spell as i said before. Now is there something wrong that i am doing here? I really would like to complete the trigger this way (if possible) rather than starting an entire new one; especially one contains codes that i don't understand =)

You probably shouldn't hijack threads, you should make your own.
 

akrep_ve_su

New Member
Reaction score
1
I see, you are the annoying guy every forum has who tells "start a new topic" or "stop creating new topics and continue from the existing one" based on occasion. Mostly this is performed in reverse order but i guess you are creating your own style. "hijack threads" huh? Really impressive..
 

tooltiperror

Super Moderator
Reaction score
231
Actually, it clearly states in the forum rules for this section...

Ghan_04 said:
E. DO NOT HIJACK THREADS! If you have a question of your own to ask, post a new thread, don't try to take over someone else's thread.
 

akrep_ve_su

New Member
Reaction score
1
Actually, it clearly states in the forum rules for this section...
Does it also state that when the original question of the topic is answered (means problem solved if thread owner didn't return in 160 days i presume(!) ); asking another question related to the same topic does not have anything to do with "taking over" ? And did it occour to you if i had opened a new topic for my question; someone would link me here and after reading instructions i would get stuck again just like i've (because of the reasons i've explained in my original post) So i wiould have to ask it in the related topic; means this one... Is this all confusing?
 
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