• 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.

[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