• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Iterating through destructables

Status
Not open for further replies.
Level 2
Joined
Aug 15, 2005
Messages
7
I'm unclear on the syntax for Jass on one particular point. Hopefully someone with more experience can help.

I have a list of 100 custom destructables. I want a simple way to iterate through them.

Assume (correctly :D ) that "s" will iterate from B000 through B02R.
Code:
set d = CreateDestructable(S2I(s), x + 74 + 100 * j, y + 962 - 100 * i, 0, 1.0, 1)
Doesn't work. I think it may have something to do with the destructable id. Simply turning "B021" into an integer, for instance, won't equate 'B021', whatever that literal is. I assume from C++ conditioning that that is similar to a char literal, which can be casted to an integer. If this is so, I can't figure out how to turn a variable into a char literal (or whatever the equivalent is in JASS) to substitute for my "S2I(s)" section of my spawn code.

If that made any sense to anyone, please tell me if you need to see more code or something. (Also try and specify WHAT code you would like to see...)

Thanks in advance.
 
Status
Not open for further replies.
Top