How to: Create Chat over Unit

Sirroelivan

Gunnerkrigg Court
Reaction score
95
?Does this trigger don't just work when the typing player actually types a "."?

Explanation plz
 

Blackveiled

Formerly, Ban-Lord
Reaction score
157
Sirroelivan said:
?Does this trigger don't just work when the typing player actually types a "."?

Explanation plz


You can make it work with a period anywhere, but you probally should do it with a period infront, by choosing 1,1 as the period and as the chat 2, 45 characters on a substring also to limit their chat, but not too low or you will never get anything to read off of it
 

Ambeco

New Member
Reaction score
2
correction:

Sirroelivan said:
?Does this trigger don't just work when the typing player actually types a "."?

Explanation plz
It should read:
Code:
Chat
    Events
        Player - Player 1 (Red) types a chat message containing . as A substring
The ! was incorrect.
 
W

waarhog

Guest
corvusHaunt said:
You should set the unit whenever someone selects it. Something like:

Code:
Event
 Selection- Player selects a unit
Condition
 Triggering Player = Owner of selected unit
Action
 Set Units[Player number of triggering player] = Selected Unit

Which can make it alot more dynamic.


Using this method u need to have a unit selected ... the other way you dont .
 

KillerChi

New Member
Reaction score
20
Is there a verisoin where fot example for my game Puppy Ownnership this would be nice if it was permenant(my bnet username is lordneptune)
lordneptune:-dogtagZorro
and in the game I want it to permentantly say "Zorro"Over the unit can you give me verisoin of that trigger?
 

Ambeco

New Member
Reaction score
2
I've never tried attaching text to a mobile unit before. I don't know offhand if it's possible, you may have to simply have it have a .5 second lifespan, and add:
wait (0.5) seconds
trigger-call trigger(this trigger)
to the end so it refreshes itself twice a second.
 

Heavy-Gear

New Member
Reaction score
7
Nice Tutorial, Very to the point A+! and Waarhog the whole point of that new trigger is that you do have a unit selected
 
S

shadowslayer

Guest
how do you...

How do you do | symbol? ( I know i just did it but that was copy paste):confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused:
 
M

Mythic Fr0st

Guest
btw

nice, it is possible to remove the chat entered by a player, you know...

and show only floating text or game messages, without going to obs or private chat etc..
 
I

ixmike88

Guest
You can hide text that is being typed in game, but the downfall is it that you are unable to toggle it.
 

Blackveiled

Formerly, Ban-Lord
Reaction score
157
Some bad things about floating text, is it will screw around with your game's selection. But that doesnt happen unless you have like a hundred floating texts :p...which is why you should use variables :D
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
All who are interested in his Tut might be interested in this one too.
Using both would be a good combination.
 

Anachron

New Member
Reaction score
53
Thanks , I used it.
For better chats make this:

Ev: ELapsed game time is 0.75 seconds
Co://
Ac:
Set Colour_Player[1]=|CFFFF00 ( for example )

Then display the textlike in tutorial but a little bit diffrent:
Floating Text - Create a floating text that reads (PlayerColour(PlayerNumberOf(TriggeringPlayer)))+(((Player name of Triggering Player) + |r + (substring(entered chat string) 2, 40)))) above PlayerUnits [Player number of (triggering player)] with Z offset 0.00, size 8.00, color (100.00% and 100.00% and 100.00%) and 0% transparency.
Floating Text - Change the Lifespan of (Last Created Floating Text) to (Real(Stringhlengh))x0.35) seconds.

This will make you display a long text longer than a 1 letter text. You will also see the player names in the original colour of the player.
 
E

Enigma

Guest
Can sombody help me i am working on a RPG map and i want to add this little programm into my map i tried the tutorial but there are some things i dont understand 1) what does this means: Set PlayerUnits[1]=Novice 0025 <gen>
i dont understand what he means with novice there isnt a command called novice and 2) Floating Text - Create floating text that reads ((|cffffcc00 + ...
but how do i get |cffffcc00 is it a string that is tipped in or is it a command ...
hope u guys can help me cause i really want to add this in my map thx a lot yours enigma
Ps.: when somebody can send me the file where this programm is included it would be great
 

Ambeco

New Member
Reaction score
2
Set PlayerUnits[1]=Novice 0025 <gen>

Where it says "Novice 0025 <gen>", he selected the button labeled (something along the lines of) "select unit" and then clicked on a unit apperently called a novice. You can select a grunt or any other unit on your map.

Floating Text - Create floating text that reads ((|cffffcc00 + ...

the "|cffffcc00blahblah|r" is a color code that you have to type in. THe |c starts it and the |r ends it. The first 8 letters after |c determines the color. Find one of the posts about the colors if you have more questions about that.
 
E

Enigma

Guest
OK thank you very much ambeco now it works but i have another big problem. My Heros get created by a dialog box but how can i choose them for the playerunit variable when they aren't on the map ? I tried to set the playerunit variable from units to unit type but then the floating text didnt recognize the variable ! thanks for the replies engima oh and |_ sexy time _|
 
S

schecter33

Guest
Wouldnt this make more sense?

EVENTS
Player - Player 1 (red) types in <Empty String> as a substring
CONDITIONS

ACTIONS
Floating Text - Create a floating text that reads (((Player name of Triggering Player) + |r + (substring(entered chat string) 1, 40))) above PlayerUnits [Player number of (triggering player)] with Z offset 0.00, size 8.00, color (100.00% and 100.00% and 100.00%) and 0% transparency.
Floating Text - Change (Last Created Floating Text): Disable Permanence
Floating Text - Change the Lifespan of (Last Created Floating Text) to 3.50 seconds.
Floating Text - Change the fading age of (Last Created Floating Text) to 0.00 seconds.
Floating Text - Set the velocity of (Last Created Floating Text) to 15.00 to 90.00 degrees.

This way all of your chat goes to floating text, and you don't need to use a .
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top