HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Floating text

07-11-2005, 12:14 PM#1
Guest
How do I make floating text? For example, I have a peasant standing on the floor (well duh) and above him are some letters saying peasant carrottop or something like that. Is it someting to do with regions? All suggestions will be taken into account
07-11-2005, 03:14 PM#2
JetPack
If your unit was placed in the map on the editor you could always do this.
Code:
Events:
Map initialization
Conditions:
Actions:
Floating Text - Create floating text that reads Look, I'm your text above Peasant 0000 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Peasant 0000 being replaced with your unit of course and "Look, I'm your text," replaced with whatever text you want.

However if the unit you wanted the text over is creating in game you'll have to do it this way.
Code:
Events:
Time - Every 2.00 seconds of game time
Conditions:
Actions:
Floating Text - Create floating text that reads Look, I'm more text above UnitVariable with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Trigger - Turn off this trigger
UnitVariable being a unit variable that you set to whatever unit you want the text over. To make a unit be the unit variable you could do something like this....
Code:
Events:
Unit - A unit enters Look, I'm a region <gen>
Conditions:
(Unit-type of (Triggering unit)) Equal to Peasant
Actions:
Set UnitVariable = (Triggering unit)
Trigger - Turn on Trigger2 <gen>
The unit enters region event can really be any event that has to do with units doing something. The condition should be changed if you want the text to go over some other unit. Trigger2 being the trigger making the floating text
07-13-2005, 05:34 AM#3
Guest
Thnx alot man, I'll try it out tomorrow