• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Chat

Status
Not open for further replies.
Level 17
Joined
Nov 26, 2007
Messages
1,964
(Trigger tags bugged, ill post pastebin)

http://www.hiveworkshop.com/resources_new/pastebin/show/9f5fd34f7455d3c01a0705c221f50c45/

What this is supposed to do is make the entered text appear over the unit and follow him around.

It does that but then a few seconds into the game after different players type it starts appearing infront of only one player and all future messages are directed over his units head.

playermarine is working since i use it in other triggers, I know this.

Any insight?
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
That is tricky. I had an idea which could be that you attemt to destroy an invalid floating text whenever the trigger is excecuted, thus leading to an invalid momevent of the floating text. Though I dont really see how...

Anyways, here are my suggestion:
First make an init trigger setting the floating text to null (and register the player event if you like, it is the fastest time for the user to register the event)
Then check the floating text ´to make sure it is not null, to run the rest of the actions.

But ey, I dont know how it would help, but its worth a try^^
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • Trigger - Add to FloatText <gen> the event (Player - (Player((Integer A))) types a chat message containing <Empty String> as A substring)
          • Custom script: set udg_Chat[bj_forLoopAIndex] = null
  • FloatText
    • Events
    • Conditions
    • Actions
      • Custom script: if udg_Chat[GetConvertedPlayerId(GetTriggerPlayer())] != null then
      • Floating Text - Destroy Chat[(Player number of (Triggering player))]
      • Custom script: endif
      • -------- Create floating text here etc what you did in your trigger --------
 
Level 17
Joined
Nov 26, 2007
Messages
1,964
I dont understand what that is supposed to do.

The floating text appears fine but on the head of the wrong unit.

It should be worth mentioning that everyones text appears correctly over their unit, untill 3 or 4 messages later then it starts appearing on someone elses head.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Yeah like I said, it was just an idea. My idea was just to make sure that it didnt try to destroy something that didnt exist, thus could result to a reference error screwing the rest up. Meh nvm that.

Right, I dont know D:
 
Level 8
Joined
Jul 22, 2008
Messages
331
Steel, I wonder... if you put separate trigger for every player...
I don't know exactly but maybe it would work...
and to create array variable for players or to create separate variables for each player...
I hope I'm telling something normal... xexexe
 
Status
Not open for further replies.
Top