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

[General] upkeeps

Status
Not open for further replies.
Level 5
Joined
Sep 22, 2012
Messages
90
I would like to use the war3's default upkeep alerts (and rename them :D) when the food is nearing the food upkeep limits. how to do this via triggers? I have these:

  • respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Respawn (5 seconds)
    • Actions
      • Set res_loc = (Center of trash <gen>)
      • Unit - Create 1 db_unit_pool[unit_class[(Player number of (Owner of (Dying unit)))]] for (Owner of (Dying unit)) at res_loc facing Default building facing degrees
      • Selection - Select (Last created unit) for (Owner of (Dying unit))
      • Set unit_main[(Player number of (Owner of (Dying unit)))] = (Last created unit)
      • Set unit_has_main[(Player number of (Owner of (Dying unit)))] = True
      • Custom script: call RemoveLocation(udg_res_loc)
but the thing is it won't fire the "NO UPKEEP" text on screen and etc?
 
Food caps are set in the gameplay constants - if I'm getting your question right.
No. It's in Game Interface. There are 3 lines, one for Low, one for None and one for High.
These are called "Text - General - <Line's Name>"

Also, you can do it using only triggers, but you won't have it shown at the top-right of the screen if you do so, by using that jass line :
JASS:
call DisplayTextToPlayer(player, x, y, "Text")
x and y are coordinates but they don't work as normal locations' coordinates. x=0 and text will be at left of the screen, x=1 and text will be at right of the screen (if you want it in the middle, then simply put 0.5). Same goes for y, if y=0 it's at top, and if y=1 it's at bottom.
But it has some limitations ^^'
 
Status
Not open for further replies.
Top