• 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] Problems with String

Status
Not open for further replies.
Level 3
Joined
Jun 23, 2007
Messages
28
  • Game - Display to (All players) the text: (((Wave + (String(WaveLevel))) + incoming:) + ((String(WaveLevelAmount[WaveLevel])) + ( + (String(WaveUnitType[WaveLevel])))))
This works perfectly just except that the last string that's supposed to be written out just says "custom n00b" and I honestly don't know why since I haven't set ANY variables to that and it should just say the Name of the Unit-Type of the current level. Or isn't it possible to do it this easy?
 
Level 3
Joined
Jun 23, 2007
Messages
28
If you didn't get it, what I was wondering about was if this string:
  • Game - Display to (All players) the text: (String(Footman))
would show up as Footman, otherwise how do I do to print the units name when I've got the Unit-Type :S

Thanks
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
What are you meaning??
Do you want the footman to have a name, want that string before footman to be its hp, dmg or what? If you only want it to be footman then remove the string in start of footman and just write it....

Maybe this is what you mean (or somethig like that) Correct?
  • Game - Display to (All players) for 30.00 seconds the text: (This unit is a + (Name of (Triggering unit)))
 
Level 3
Joined
Jun 23, 2007
Messages
28
To be exact I want:

  • Game - Display to (All players) the text: (String(WaveUnitType[WaveLevel]))
Where WaveUnitType is an array of the type Unit-Type and WaveLevel is an integer. I've already preset the WaveUnitType to a certain Unit-Type I want to be shown later using this trigger. The Unit-Type already inserted into the WaveUnitType array is a custom unit and therefor it shows the text "custom xxxx" instead of the units acctual name. Anyone know how I can go around this or change the trigger?
 
Level 3
Joined
Jun 23, 2007
Messages
28
RED BARON, that wouldn't work. Since the text is supposed to be written out before the unit would spawn or whatever is going to happen. I just want this trigger to type out what Unit-Type is stored within that variable, and it doesn't work since all I get is "custom xxxx" :/
 
Last edited:
Level 35
Joined
Oct 9, 2006
Messages
6,394
Hmm ya I see the problem, but didnt know it was so in your map:smile:...
Then because I dont have WEU infront of me right now, I can only get this idea: Spawn the next wave units in a not playable room and use name trigger, then move the spawned unit to the waveunits startposition. But a bit complicatet way to do it. But would work.
Else you can always just write it all for each wave.
Meaning, chach condition it is unittype: (the unit type would be the custom blabla, but it would be able to use it as a condition, if true write the name you self wrote fiting the unittype condition. Would be massive amount of if mulitable actions. Forst idea better.
Cant think up something better at this time. Maybe I return with new idea.
Ps. Hope this makes sense.
 
Level 10
Joined
Jan 21, 2007
Messages
576
@ map init make string variable that is an array with the number of waves you have, set each one to what that level would be.
 
Level 3
Joined
Jun 23, 2007
Messages
28
I did an array containing for each 'level' what I wanted to be written out, but I still think that's the easy way out. Really ugly solution :p
 
Status
Not open for further replies.
Top