| 07-29-2004, 10:43 PM | #1 |
I am working on a system so when you type name "blahblah" a moving floating text will follow the unit saying "blah blah" forever until deleted. I am aware this involves loops and variables... I have so far this... set Events Player - Player 1 (Red) types a chat message containing name as A substring Conditions Actions Floating Text - Create floating text that reads (Use brightness Average and color Simple - Red and color this text: (Substring((Entered chat string), 6, 60))) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency How would I loop it forever from there, please realize this must work on more than 1 unit... |
| 07-29-2004, 10:46 PM | #2 |
I personally have no experience of such a system but i have been told that floating text following a unit or more creates A LOT of lag. |
| 07-29-2004, 11:41 PM | #3 |
The problem with trying to do this is that the only way to get the effec tis to CONSTANTLY destroy adn re-create the floating text. That creates BOATLOADS of lag (case in point, SentryIII's Battleship Command). My advice is to just forget the whole thing. But if you still wanna try it, just yell. |
| 07-29-2004, 11:43 PM | #4 |
yells* :) I will make this trigger enableable or disable by host that way its his decision if he wants teh game to lag or not. |
| 07-29-2004, 11:47 PM | #5 | |
Quote:
|
| 07-29-2004, 11:49 PM | #6 |
What I need is help with the trigger..... I have no idea to go about setting the variables since the value should be editable. Example: name jib (woops I put jib lemme edit that) name jim , there we go the floating text is now fixed |
| 07-29-2004, 11:56 PM | #7 |
First of all, this causes lag because of the processing involved, not because of the location leaks. Battleship Command got so bad that the ENTIRE game JUMPED around. It was like playing a game at 0.5 fps. Set up a string array called "playerNames". Set it's size to 12. Create a floating text "floatingNames" variable array with the same settings. You can do a trigger to set each palyer's name himself. I'm sure you can figure that out. The actual following text trigger would be like this Code:
Events:
Every 1 second
Action:
For each integer 1-12 do:
Floating text- Destroy floatingNames[integer A]
Set temploc = position of playerHero[integer A]
Floating text- Create floating text with text <playerName[integer A]> at temploc with velocity whatever, colour whatever
Set floatingNames[integer A] = Last created floating text
Custom script: Call RemoveLocation(udg_temploc)My JASS may be wrong, just writing this off the top of my head, but you get the idea. You'll actually need another variable to store the player's hero (makes it easier to retrieve the location of the unit). Additionally, floating text is VISIBLE THROUGH FOG OF WAR. One of the other silly bits of BSC. |
| 07-30-2004, 12:03 AM | #8 |
Im not great with variables, could u put this in a w3x? Im having trouble with the Floating Text- destroy floatingNames [INTeger A] specifically the Integer A part. |
| 07-30-2004, 12:04 AM | #9 | |
Quote:
Ohh , I seee you re create the floating text... You can actually move a floating text to a position without destroying it and creating it again |
| 07-30-2004, 12:05 AM | #10 | |
Quote:
How? I havent seen any function like that in WEU |
| 07-30-2004, 12:08 AM | #11 |
Custom Script : SetTextTagPosUnit( (-Floating Text-) , (-unit-) , 0.0 ) or Custom Script : SetTextTagPos( (-Floating Text-) , (-x-), (-y-) , 0.0 ) |
| 07-30-2004, 12:09 AM | #12 |
If that is less laggy then how would I import that to my map, err well I know how to make custom text but how woulld I change the coordinates, etc. I dont know JASS |
| 07-30-2004, 06:57 AM | #13 |
You can move floating text with JASS? Arrr. Well that still doesn't solve the problem that floating text appear regardless of LOS (meaning you'd be able to see everyone's names, whereever they are). |
| 07-30-2004, 07:05 AM | #14 |
Ok, so which way is the easiest and less-laggy way to do this? Also, please if possible, just attach the w3x so I can examine it better. |
| 07-31-2004, 03:33 PM | #15 | |
Quote:
|
