| 01-04-2006, 03:44 PM | #1 |
This is not a question that has a simple answer. IF you know little to nothing about JASS, then i doubt you can help. (you can still try )I have a 20 / 20 grind were each square consists of 4 squares. (as in terrain squares) I have the terrain under these squares generated dynamically by a complex algorytum. (which works. no help needed there) Now, i have specific sets of units, doodads, and terrain deformations that must be placed "randomly" across the field, each taking up 1 square. (and leaving many empty squares.) my question to you is, how in the hell do i store these pre-arranged "ideas" of units, doodads, and terrain deformation values, as to allow them to be referanced on-the fly, and all grabed then placed together. (while maintaining their relative positining values) any ideas? :-/ (why must i always have complex ideas >_<) |
| 01-04-2006, 03:50 PM | #2 |
Sentences start with capital letters! 'I' is supposed to be capitalised too! *Grid *Algorithm *Referenced *Grabbed *Positioning Hope that helps! Gosh, I'm so witty! Perhaps a 2D array? |
| 01-04-2006, 04:15 PM | #3 | |
Quote:
thoght of that, but each object in the set is a diffrent datatype. maybe multiple 2 dimensional arrays each of a diffrent datatype then another array that holds the positioning data for all objects in the other arrays.... hmn... thats allot to think about X_X |
| 01-04-2006, 06:11 PM | #4 |
the mutliple 2d arrays would work, you then could add an addition integer or string array to hold some numbers. each digit of the number would then represent which speicifc unit, item, deformation ect, which would have to be set in the beginining i dunno if this wud work tho |
| 01-04-2006, 08:06 PM | #5 | |
Quote:
i would think olding the sets in arrays this way would work better: Code:
|-----| |Units| |-----| | |01|peon | |02| | |03| | |04|Peasent | |05|footman | |06|paladin | |---------------| |--------| |Doodadss| |--------| | |01|tree | |02|box | |03| | |04|tree | |05| | |06| | |---------------| |--------------| |unit Locations| |--------------|| |01|40.78 | |02| | |03| | |04|60.57 | |05|70.56 | |06|67.89 | |---------------| ext. that creates a limit on the number of objects of a type in a set, but thats ok. now to figure out sets of sets >_< (as in an onject that is 4/4 squares large. >_< 4/1 is easy.. 4/4 is gonna be a B***) any ideas on placement algorytms? |
