HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Coustom text and changing intergrers(spelling :D)

06-28-2004, 04:21 AM#1
joke
Hey... I was just wondering where we could learn how to use coustom text in the trigger editor, and also if you can change integrers like a units health or mana. I wanna trigger like this Integrer set target of abilities health/mana to x. You catch my drift. I'd mainly like to learn coustom text though, if it isnt that complicated ofcourse...
06-28-2004, 10:35 AM#2
MeuhAteTree
Quote:
Originally Posted by joke
Hey... I was just wondering where we could learn how to use coustom text in the trigger editor, and also if you can change integrers like a units health or mana. I wanna trigger like this Integrer set target of abilities health/mana to x. You catch my drift. I'd mainly like to learn coustom text though, if it isnt that complicated ofcourse...

the custom text is called JASS, it isn't difficult at all if you are familiar with a few other computer languages: my friend learned JASS for the most part in a very short time (few minutes) because of his knowledge of other languages. You Can change a units health or mana with triggers, which you don't need to know jass to do, it's a trigger function. If you use an advanced editor such as we unlimited there is an advanced function for changing the units max hp, or strength.
06-28-2004, 02:27 PM#3
Shimrra
Just so you know, units life is actually a real. As for your life trigger, there should be a GUI action 'Unit - Set Life of Unit' and 'Unit - Set Mana of Unit'. Just set your real-type variable X to what you want and then use the above actions to set the properties to X.

As for Jass, the only reason I ever even use it is for local variables. Like MeuhAteTree said, if you have knowledge of other programming languages, it won't be too hard. In my opinion, Jass is rather painful because you have to type everything and it's case sensitive. In addition, you have to memorize the functions, making it even more trouble. I learned Jass (what I know of it) through making triggers in GUI and then using the 'Convert to Custom Text' command to see what it was like in Jass. Then I read through and studied the new version until I eventually figured out exactly what was going on. To help exemplify how Jass is wierd, the Jass command for Wait is "call TriggerSleepAction( X )" where X is the number of seconds.

As for advanced World Editors, I would suggest you never get one. I have three main reasons for this:
  1. Compatibility: 'Advanced' World Editors will never work right with the normal World Editor unless all the 'advanced' triggers are converted to Jass. This causes problems with demo maps or team projects because the other team members may not be able to open the map. If it's in Jass, then you have to worry about whether your team members or other people who are to view the map can read Jass or not.
  2. Blizzard Updates: Whenever Blizzard updates it's World Editor, the 'advanced' one will not work properly because it lacks the changes that Blizzard implemented. This means almost everytime a new patch comes out, you have to to sit and wait for an updated version of your editor comes out.
  3. "Special" Features: The 'advanced' World Eitors don't have anything in them that can not be done in Jass with the normal World Editor. It's a bit more painful, but you don't have any of the above problems.
06-28-2004, 04:41 PM#4
Emekun
This is undoubtedly one of the better JASS introductions out there. Also contains references to more complex JASS information, have a look if you got some time and patience to spare.
06-28-2004, 11:38 PM#5
th15
Oh and you can convert integers to real values to use them to set unit life/mana using the "Convert inetger to real" function.