• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Showing variable value in text ?

Status
Not open for further replies.

Ardenian

A

Ardenian

Is it possible to add a variable somehow into a text ?

For example:


'Set Varibale_X to Random Player'
-> Quest: Kill *Player-name/color/.. that is defined by variable*

Another example:

variable Y counts kills.

Event: A unit kills a unit

Action: show text: 'You have killed Y units'
 
Level 25
Joined
Sep 26, 2009
Messages
2,407
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set x_var = (x_var + 1)
      • Game - Display to (All players) the text: (You have killed + ((String(x_var)) + units.))
It's the "Conversion - Convert Integer/Real to String" and Concentrate Strings options.
 
Status
Not open for further replies.
Top