• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[Solved] Chat Bubble display when talking

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hi!

I'd like to know how to display the "Silence" icon/Buff/model for 1 second over the player hero in the RPG who's talking.

I Say: Me! -> Silence model appear in my hero overhead for 1 sec, with no effect at all.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 004 Copy
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Custom script: local effect e
      • Set u = Paladin 0059 <gen>
      • Custom script: set e = AddSpecialEffectTarget("Abilities\\Spells\\Other\\Silence\\SilenceTarget.mdl", udg_u, "overhead" )
      • Custom script: call TriggerSleepAction(1)
      • Custom script: call DestroyEffect(e)
      • Custom script: set e = null
When ESC is pressed, the effect will appear on unit u for 1 second.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
GREAT! EXCELENT!

Two things:

1) How can I trigger when the player types anything?
2) How can I avoid the "OOOUUUHM" sound? i just want the icon :D
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
It means it can't be removed?

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing as A substring
    • Conditions
    • Actions
      • Custom script: local effect e
      • Set u = Heroes[(Player number of (Triggering player))]
      • Custom script: set e = AddSpecialEffectTarget("Abilities\\Spells\\Other\\Silence\\SilenceTarget.mdl", udg_u, "overhead" )
      • Custom script: call TriggerSleepAction(1)
      • Custom script: call DestroyEffect(e)
      • Custom script: set e = null
The "Exact Match" don't have a "True" or "False"...
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Like this?

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing as A substring
    • Conditions
    • Actions
      • Set u = Heroes[(Player number of (Triggering player))]
      • Custom script: AddSpecialEffectTarget("Abilities\\Spells\\Other\\Silence\\SilenceTarget.mdl", udg_u, "overhead" )
      • Custom script: call TriggerSleepAction(1)
      • Custom script: call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Silence\\SilenceTarget.mdl", udg_u, "overhead" ))
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Maker has shown him that and since he quite don't get whats going around he probably didn't get that idea too ^^

Pharaoh_ actually meant to cut this part:
  • Custom script: local effect e
  • Custom script: set e = AddSpecialEffectTarget("Abilities\\Spells\\Other\\Silence\\SilenceTarget.mdl", udg_u, "overhead" )
  • Custom script: call DestroyEffect(e)
  • Custom script: set e = null
Into:
  • Custom script: call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Silence\\SilenceTarget.mdl", udg_u, "overhead"))
Although there is one problem Pharaoh_ -> he wants the effect to stay for a while, thats why local is needed.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Oh! Don't worry!

I tested what Pharaoh_ said and works good. I just wanted to difference the heros. Since they are based on the Villager model, they don't have custom player colors, and if one of them is saying "HEAL" or "HELP ME" the others know who said it. =)

EDIT: Hmmmmm.. the health bar sometimes hides the icon I guess players will have to live with it xD

The other problem remains :p How to make it display when anything is typed? I set it when a space is typed :p But would work only for two words messages :D

EDIT: Ok... made 5 events for typing a blank space on any message, and another 5 events when any of the 5 players skips a cinematic. If a player needs help or something he can just press Esc repetidly and the icon will display =)
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Lol..
For any chat message just enter: <Empty string>. To do so, click on red underlined keyword 'Text' (while event Player - Chat Message is selected) so new window will appear. Now just click 'Ok' and you have your 'every message'. Ensure that 'A substring' option is chosen too.

  • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
Will react on each message written by player 1 (red).
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Here's the effect with no sound. Import it with any path you like, I used war3mapImported\SilenceTarget2.mdx here:

  • ...AddSpecialEffectTarget("war3mapImported\\SilenceTarget2.mdx", udg_u, "overhead" )
I tested it and it worked fine, still take a backup of your map before importing.
Link
 
Status
Not open for further replies.
Top