• 🏆 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!

[Trigger] Variable Problem

Status
Not open for further replies.
Level 3
Joined
Jan 1, 2012
Messages
50
for your floating text, i haven't (because i can't) dl your map but i think you wantt to use a variable type floating text for a string.
you can destroy a string, create a string, but you can create a floating text with a variable type floating text for value (you understand ?)

value = string, floating text = object.
a floating text takes a string and return floating text :)

for your second problme, i can't answer because i need to dl the map.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
oh man...

stop use damn much useless triggers like this... if u do something like this or merge with trigger where u call this trigger or make event to this trigger, in wc3 not problem if u got long trigger also u run trigger without event then where get the trigger the parameters like trigger unit, trigger player, leveling hero etc?

  • Pause
    • Events
    • Conditions
    • Actions
      • Quest - Display to (All players) the Quest Update message: [|cffffcc00TRIGGER|...
      • Unit - Pause Altar
      • Wait 13.00 game-time seconds
      • Wait (2.00 x (Real((Hero level of HERO)))) game-time seconds
      • Unit - Unpause Altar
see this run trigger NOT egual than include in c... this trigger also cant get what unit is the reviving, check the screenshot and try forget ur knowleadge about another languages

  • ProgressBar
    • Events
    • Conditions
    • Actions
      • Quest - Display to (All players) the Quest Update message: [|cffffcc00TRIGGER|...
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Wait (((0.00 + 13.00) + (2.00 x (Real((Hero level of (Reviving Hero)))))) / 10.00) game-time seconds
          • For each (Integer B) from 1 to (Integer A), do (Actions)
            • Loop - Actions
              • Set tmp = (tmp + ON)
          • For each (Integer B) from (Integer B) to 10, do (Actions)
            • Loop - Actions
              • Set tmp = (tmp + OFF)
          • Floating Text - Destroy Bar
          • Floating Text - Create floating text that reads tmp above Altar with Z offset 0.00, using font size 16.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Destroy Bar
 

Attachments

  • 2.JPG
    2.JPG
    21.8 KB · Views: 43
Level 9
Joined
Nov 19, 2011
Messages
516
Ye I could stack it with init.

But it still not work. :/ I've tried to not use destroy/create actions but change text. In not worked again.
More or less, Floating Text is not destroyed... :/

-----
EDIT
-----
Thanks all of you. I've found what I fucked. I just didn't clear tmp. I should start useing more than 1% of my mind. :vw_unimpressed:
and 'Triggering unit' is hero. How to get the altar then?
 

Attachments

  • PB.w3x
    18.2 KB · Views: 32
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
Ye I could stack it with init.

But it still not work. :/ I've tried to not use destroy/create actions but change text. In not worked again.
More or less, Floating Text is not destroyed... :/

-----
EDIT
-----
Thanks all of you. I've found what I fucked. I just didn't clear tmp. I should start useing more than 1% of my mind. :vw_unimpressed:
and 'Triggering unit' is hero. How to get the altar then?

coz u dont null the string also its a fail if a player have more hero or if have more player with hero then atleast u must use float text array, string array

u can check my map, work the float text

[edit]
oh and a thing... wait is not accurated really in multiplayer map, 1sec wait more if it is a multiplayer map and this depend from latency/lagg also.

u can use unit group and periodic trigger
 

Attachments

  • PB (1).w3x
    18.4 KB · Views: 43
Level 17
Joined
Nov 13, 2006
Messages
1,814
Ye but what about altar? how to set it. As triggering unit? Gues not.

something like this?
  • Unit Group - Pick every unit in (Units of type Altar of Kings) and do (Actions)
    • Loop - Actions
      • Set Altar[(Player number of (Owner of (Picked unit)))] = (Picked unit)
or if u use more Altar type then

  • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Picked unit)) Equal to Altar of Kings
              • (Unit-type of (Picked unit)) Equal to Altar of Storms
              • (Unit-type of (Picked unit)) Equal to Altar of Darkness
              • (Unit-type of (Picked unit)) Equal to Altar of Elders
              • (Unit-type of (Picked unit)) Equal to Altar of the Depths
        • Then - Actions
          • Set Altar[(Player number of (Owner of (Picked unit)))] = (Picked unit)
        • Else - Actions
 
Status
Not open for further replies.
Top