how can i return all arrays of a variable, so i created a point variable with an array of 15 and i want to destroy all 15 of them. so the action is like
destroy spawn point[1 - 15] or something like that. Or do i have to create 15 actions?
thx
EDIT: i think i founded it, a preset called all with type "all count"?
it kinda doesn't work. lets give you another example.
this is for the map im making, you can set spawn points. At those spawn points spawns the units that you create through chat messages.
you can make those points with control + left mouse button, if you do it that way u can only create 1 spawn points, but if you press control + shift + left mouse button you can create more.
But i want it that the limit is 15 points. You also see a text tag at the points. Now i want many things with the arrays of the point and the text tag ( both are variables) first of all how can i set it so it removes the first created spawn point if you create the 14th point. and i want it so it creates the units at all of the spawn points u made so if u made 7 spawn points and u create 4 marines u get 4 marines at all those 7 points. i can attach the map if u want.
thx,
ps. Dont think u understand any of this but at least give it a try :p
EDIT: didn't read the edited post, ignore this one for now.
so you want every player to have 15 different points they can set
you would start with this
Global Variables
PlayerSpawns[0-15][0-15] this is a multi-dimensional array. the first 0-15 is to represent the player the second set is for the player's spawn points 0-15
As players create thier points you would set these to be
PlayerSpawns[triggering player][index of spawn point to create] = Point where you want the spawn
you will have to work out your own logic for tracking how many points the player currently has
you could actively check all the points they have set before adding another point or you could use another integer array to track how many points each player currently has. ( I would suggest another array since the logic is simpler that way.
Also remember that when you remove one of these spawn points you need to set
PlayerSpawns[triggering player][index of spawn point to create] = No Point or Null
ty for this, but got one little question: what do you mean with "index of spawn point to create" is this a function? i used the search function but couldn't find anything.
•PlayerSpawns[0-15][0-15] this is a multi-dimensional array. the first 0-15 is to represent the player the second set is for the player's spawn points 0-15
PlayerSpawns[1][0] = point 1
PlayerSpawns[1][1] = point 2
PlayerSpawns[1][2] = point 3
PlayerSpawns[1][3] = point 4
PlayerSpawns[1][4] = point 5
by index I mean the index of the point, out of the 15 for a specific player
Index = position in array
I feel like im teaching CompSci here..... wish I had finished that degree....
its all to advanced for me. i got so many problems. i will attach the map so if you want u may take a look. hope you understand what i was trying to do than.
oh and to create a unit type this
"amount - unit type - player"
so if you want 2 marines for player 1 u type in
"2 marine 1"
dont put the unit type in plural so not marines or zealots and also units with 2 words in it u have to type them together so darktemplar and commandcenter.
and to kill someone you select the unit and press control D. and to make a spawnpoint press control and click where you want it to be, but thats the part where the bugs are.
appreciate it when you look at the map :) but you dont háve to. its also fun to play with :p
Not quite sure what the name of it was.. Its an RPG library though you might find it if you look through the maps hosted on here that are under the Library defininition.
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
To post a comment, please login or register a new account.
how can i return all arrays of a variable, so i created a point variable with an array of 15 and i want to destroy all 15 of them. so the action is like destroy spawn point[1 - 15] or something like that. Or do i have to create 15 actions?
thx
EDIT: i think i founded it, a preset called all with type "all count"?
@thommiej: Go
ummm loop through your array. ( go study array logic if you dont understand this before using arrays)
http://en.wikipedia.org/wiki/Array_programming
@SouLCarveRR: Go
it kinda doesn't work. lets give you another example. this is for the map im making, you can set spawn points. At those spawn points spawns the units that you create through chat messages.
you can make those points with control + left mouse button, if you do it that way u can only create 1 spawn points, but if you press control + shift + left mouse button you can create more.
But i want it that the limit is 15 points. You also see a text tag at the points. Now i want many things with the arrays of the point and the text tag ( both are variables) first of all how can i set it so it removes the first created spawn point if you create the 14th point. and i want it so it creates the units at all of the spawn points u made so if u made 7 spawn points and u create 4 marines u get 4 marines at all those 7 points. i can attach the map if u want.
thx, ps. Dont think u understand any of this but at least give it a try :p
EDIT: didn't read the edited post, ignore this one for now.
@thommiej: Go
so you want every player to have 15 different points they can set
you would start with this
Global Variables
As players create thier points you would set these to be
you will have to work out your own logic for tracking how many points the player currently has
you could actively check all the points they have set before adding another point or you could use another integer array to track how many points each player currently has. ( I would suggest another array since the logic is simpler that way.
Also remember that when you remove one of these spawn points you need to set
@SouLCarveRR: Go
ty for this, but got one little question: what do you mean with "index of spawn point to create" is this a function? i used the search function but couldn't find anything.
thx
@thommiej: Go
its not a function
•PlayerSpawns[0-15][0-15] this is a multi-dimensional array. the first 0-15 is to represent the player the second set is for the player's spawn points 0-15
by index I mean the index of the point, out of the 15 for a specific player
Index = position in array
I feel like im teaching CompSci here..... wish I had finished that degree....
@SouLCarveRR: Go
its all to advanced for me. i got so many problems. i will attach the map so if you want u may take a look. hope you understand what i was trying to do than.
oh and to create a unit type this
"amount - unit type - player"
so if you want 2 marines for player 1 u type in
"2 marine 1"
dont put the unit type in plural so not marines or zealots and also units with 2 words in it u have to type them together so darktemplar and commandcenter.
and to kill someone you select the unit and press control D. and to make a spawnpoint press control and click where you want it to be, but thats the part where the bugs are.
appreciate it when you look at the map :) but you dont háve to. its also fun to play with :p
@thommiej: Go
theres already a library out that does this all for you......
im at work right now cant really look at it
@SouLCarveRR: Go
do u know whats the name of it?
@thommiej: Go
Not quite sure what the name of it was.. Its an RPG library though you might find it if you look through the maps hosted on here that are under the Library defininition.