Seems to be a problem with your player variables, they might not be initialized yet or they are set to a wrong value. Try to print the player numbers before creating the units. Also using a different event might work (like elapsed game time is 0 seconds).
instead running actions from trigger (which run at initialization = don't know order)
create custom action and cut paste actions to that custom action, then run custom action in 1 global initialization trigger
whatever you do , avoid multiple map initialization triggers because you can't predict order in which they will be run also this may lead to non initialized variables calls like you have here
if you want to go easy/lazy way, change map initialization to game time elapsed 0.1
Ahh I see. I always thought it was the order of the them in the side panel. From Top to Bottom... I made it so that the original trigger start at game elapsed time of 0:000:000 and the variable trigger run at map init and still the problem... Should i make time elapsed longer?
-nvm still does not work if i make time elapsed .2 seconds. SO i dont know whats wrong ?
if your alone or with 1 friend it picks all Active players and add them to team but it won't check if there are actually all player, same with another part which also won't ensure that players actually exist.
Set'Team 1 Players[1]'=Player1from'Team 1'(whichmaybeyou;player1)Set'Team 1 Players[2]'=Player2from'Team 1'(ifteamisnotfullitwillyield-1becausethere's no guy at Player 2 spot)etc...
also i don't know exactly what your goal is but with current setup you will spawn 3 units of 3 players per player so it will be 9 units per team.
Instead you should simply use
PicheachplayerinPlayersonTeam1anddocreateunitforplayer'Picked Player'at'Center of Team 1 spawn'EndofpickPicheachplayerinPlayersonTeam2anddocreateunitforplayer'Picked Player'at'Center of Team 2 spawn'Endofpick
Above will run per player in group so if you failed to add them or they don't exist it won't run hence it won't generate errors
SO now that Im offfline, ITs saying -1 because there is no players for player 2?
But I thought IT would not do player 2 beause it was not an active player?
Essentially, I wish to create 3 scvs for team 1 in the region team 1 spawn and 3 scvs for team 2 in the region team 2 spawn, but only for the people in the game, not for people who disconnected prior toi game start or if the game started with 4 people. after the previous screen shot, it is still coming up with errors.
IS it just because it is local? WIll it effect the game play?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
00:00:00.00 Trigger Error in 'gt_MeleeInitialization_Func': Parameter out of bounds in 'sUnitCreate' (value: -1, min: 0, max: 15)
That is the message I am struck with, I have no idea what Iit could be ...
please help, I have attached a picture
Seems to be a problem with your player variables, they might not be initialized yet or they are set to a wrong value. Try to print the player numbers before creating the units. Also using a different event might work (like elapsed game time is 0 seconds).
still has an error, I am thinking that it is because its local? I still get my unit so idk
Drop it in action and run action at map init and make sure you assign Team Players[i] values before calling this
(value: -1, min: 0, max: 15) Clearly says that value is -1 at given time where players range from 0 to 15
What do you mean drop it in action ??
instead running actions from trigger (which run at initialization = don't know order)
create custom action and cut paste actions to that custom action, then run custom action in 1 global initialization trigger
whatever you do , avoid multiple map initialization triggers because you can't predict order in which they will be run also this may lead to non initialized variables calls like you have here
if you want to go easy/lazy way, change map initialization to game time elapsed 0.1
Ahh I see. I always thought it was the order of the them in the side panel. From Top to Bottom... I made it so that the original trigger start at game elapsed time of 0:000:000 and the variable trigger run at map init and still the problem... Should i make time elapsed longer?
-nvm still does not work if i make time elapsed .2 seconds. SO i dont know whats wrong ?
well when it comes to active players they MAY not exist as 'active' at initialization so you should run both at time elapsed 0
Still has the same errors even tho I did what you say :/ putting both at time elapsed 0... Any other ideas
do you test it in bnet?
if your alone or with 1 friend it picks all Active players and add them to team but it won't check if there are actually all player, same with another part which also won't ensure that players actually exist.
also i don't know exactly what your goal is but with current setup you will spawn 3 units of 3 players per player so it will be 9 units per team.
Instead you should simply use
Above will run per player in group so if you failed to add them or they don't exist it won't run hence it won't generate errors
SO now that Im offfline, ITs saying -1 because there is no players for player 2? But I thought IT would not do player 2 beause it was not an active player?
Ok I saw edition! THanks a heap just realised my mistake! Uhm How would I attach regions to the scvs and add them to unit groups?
Essentially, I wish to create 3 scvs for team 1 in the region team 1 spawn and 3 scvs for team 2 in the region team 2 spawn, but only for the people in the game, not for people who disconnected prior toi game start or if the game started with 4 people. after the previous screen shot, it is still coming up with errors. IS it just because it is local? WIll it effect the game play?