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

[Responded] [Assignment] Week 3

Status
Not open for further replies.
Level 3
Joined
Feb 11, 2013
Messages
21
This is not completed I'm just hoping you can give me some guidelines.
Please? =)
 

Attachments

  • vJASS Student W3.w3m
    28.4 KB · Views: 4
- Lesson 21 is mostly right on your part.
I'd suggest using a 32-bit calculator to review one of them ;)

- Lesson 22 asks about the validity of the expressions, meaning whether they are valid JASS expressions or not, not the value of the expression.

- I'd suggest going over what ~ actually does. It's not like "not".
not turns anythng that has a value not equal to false/0 into false.
It turns 0/false into true.
~ reverses the bits, so 0 becomes 1 and 1 becomes 0.

- Lesson 23 also asks for the validity of the expressions, meaning if they are valid JASS expressions or not.
Strings can't actually be compared with anything other than the ==/!= operators ;p
Yes, in C/C++ and the like, "1" > "0" == true would make sense, as you'd interpret them as Base 256 ASCII ints or whatever. (Chars in this case)

- About this:
Code:
//            you got me so confused about reals and what they print the other day
//            so let's say this is TRUE because the only way I know to check this 
//            is to print it ingame and that will take some time, could you tell me if there's a faster way?
You're right.
Printing them is the way to go ;)
This allows users to go "wtf, is this possible?" because not everyone in here knows how reals are stored in memory :p

- I'm going all wtf at Lesson 25 P2 o-O
Bro, you need to find a smart way to detect whether something is a number or not.
I'll give you a hint. You need to use a combination of two reciprocal natives to do a number-validation smartly ;)

- IsUnit is the same as unit1 == unit2

- You should probably print the result of (78568886. == 78568886)

- I would suggest printing angle values for a unit, because there's a trick you didn't pay attention to in the Project.
Angle values suck in Wc3 :c
 
Level 3
Joined
Feb 11, 2013
Messages
21
Just wanted to post an update, just finished all the practice lessons I think I got them right this time and I will be focusing on the project 3 now. Probably in a couple of days I'll post you the map finished or a cryout for help, I hope the first one!
 
Level 3
Joined
Feb 11, 2013
Messages
21
Here's the assignment again with all the parts complete and corrected.
The only part that I didn't make to work on the project is to remove more than 1 selected units at a time. Probably its a function I need to find, but I tried working with GetEnumUnit or GetTriggerUnit or GetFilterUnit but nothing happens :(
Basically my problem is to somehow get the player selection. I've read the function list countless times, at least the ones that return unit to no avail.
Hope to hear a reply soon.
 

Attachments

  • vJASS Student W3.w3m
    29.8 KB · Views: 2
Status
Not open for further replies.
Top