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

[Solved] Making a Value = value -1

Status
Not open for further replies.
Level 3
Joined
May 15, 2011
Messages
30
Hi Hive Pro dudes :p

I am currently making a map and I am just starting to learn triggering etc. (Not JASS just yet, I do know a little VB and am starting to learn C++ but I want to get familiar with the triggering system before moving on to JASS) But I came across a small problem which after quite a long time of searching I just could not find the answer to.

The problem is this:

I set up a leaderboard and added the players to the leaderboard etc. and then I set up a value which equals to a set amount. After a unit of that team dies I want the value (an integer variable named NR) to equal itself minus one. I know there is a very simple solution to this problem but for the life of me I just cannot find it! All I seem to be able to do is this:
  • Set NR = NR
or this
  • Set NR = -1
Help would be appreciated here ^^
 
Level 3
Joined
May 15, 2011
Messages
30
If you're learning C++ and you know some VB, I'd recommend skipping directly to vJass and skip vanilla Jass >:V

About that GUI, you should use the "Arithmetic" thing.
Set NR = (NR - 1)

edit

3000 POSTS FTW!! :D

Thank you very much my friend! I can't believe I missed it before :p

Might I ask what is so wrong with Vanilla Jass lol?

And congratulations on your 3000 posts :p The most I have ever gotten on a forum is 650+ :)
 
Level 5
Joined
Dec 12, 2011
Messages
116
Hey, your question wasn't answered...
When setting the value of the variable, search for Arithmetic in the function list.
Take a look at the image attached to this post

EDIT: lol wtf, obviously it was answered xD I am blind
 

Attachments

  • Arithmetic.jpg
    Arithmetic.jpg
    105.3 KB · Views: 87
Level 3
Joined
May 15, 2011
Messages
30
Hey, your question wasn't answered...
When setting the value of the variable, search for Arithmetic in the function list.
Take a look at the image attached to this post

EDIT: lol wtf, obviously it was answered xD I am blind

Hehe, that's alright! You help is appreciated also. Perhaps if someone else comes along with the same problem they would be able to see your image and find it easier :p
 
Status
Not open for further replies.
Top