• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[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