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

Learning JASS (Need help)

Status
Not open for further replies.
Level 15
Joined
Feb 9, 2006
Messages
1,598
Hey!

I've been learning JASS for, well let me see....1 day :p Learning it so I can create a system..

Anyhow:

How do I create a variable-Integer every time say a unit enters a region. And this Integer will decrease -1 every second. When the same unit enters the rect a string will show him what the number of that Integer is....

hehe, I suck at explaining things :S Though I hope you understood all of that :)

~Operator
 
Level 7
Joined
Nov 12, 2005
Messages
299
Um you are aware that one hour is simply not enough for the people to read/reply?

Well anyway...you don't really need Jass for this. Since you're learning it the best thing to do is make this in GUI and then convert to custom text. This way you will see the real code GUI wraps.
 
Level 7
Joined
Nov 12, 2005
Messages
299
  • Region
    • Events
      • Unit - A unit enters <your region>
    • Conditions
    • Actions
      • Game - Display to (All players) for 30.00 seconds the text: (String((Custom value of (Entering unit))))
      • Unit - Set the custom value of (Entering unit) to 1000
  • Reduce
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • 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
              • (<your region> contains (Picked unit)) Equal to False
            • Then - Actions
            • Else - Actions
          • Unit - Set the custom value of (Picked unit) to ((Custom value of (Entering unit)) - 1)
Something like that.
 
Status
Not open for further replies.
Top