I know there are simple solutions to these problems I am having with my map, but I cannot for the life of me figure them out.
1) I have a global respawn trigger for when any unit dies and it works, except it also respawns NPC hostiles, which I don't want. I have tried adding checks, conditions, ect. but can't figure out how to make this global trigger effect players only, not npcs.
2) How do I get the camera to pan back to the newly spawned unit? I have tried literally every camera option but get an error every time because it can't find the triggering unit, or some other variation of that type of error.
For the global respawn trigger... Make a player group and use "if then else" and make the condition that owner of unit (the one you respawn) is part of the player group. OR just make a condition in an if/then/else thing before anything runs (Owner of Unit(bla bla) is controlled by (user)). I know it was possible to do the second in WC3, havent used in sc2 yet though so i dont know the exact names.
For 2) - set a variable as the spawned unit,
Camera - Pan the camera for player (Owner of "Variable") to (Position of Unit (Variable)) over (time) seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
OR if you respawn the units at a certain fixed location, put a point there and use that instead of Position of unit. If neither of these will/can work, make a variable (point), set it to the position of the unit where it's supposed to respawn, and re-use that variable instead of position of unit.
If you still have trouble, mind copying your triggers into your next post or posting a screenshot?
Issues solved, thanks guys!
I know there are simple solutions to these problems I am having with my map, but I cannot for the life of me figure them out.
1) I have a global respawn trigger for when any unit dies and it works, except it also respawns NPC hostiles, which I don't want. I have tried adding checks, conditions, ect. but can't figure out how to make this global trigger effect players only, not npcs.
2) How do I get the camera to pan back to the newly spawned unit? I have tried literally every camera option but get an error every time because it can't find the triggering unit, or some other variation of that type of error.
Any help would be greatly appreciated!
For the global respawn trigger... Make a player group and use "if then else" and make the condition that owner of unit (the one you respawn) is part of the player group. OR just make a condition in an if/then/else thing before anything runs (Owner of Unit(bla bla) is controlled by (user)). I know it was possible to do the second in WC3, havent used in sc2 yet though so i dont know the exact names.
For 2) - set a variable as the spawned unit,
Camera - Pan the camera for player (Owner of "Variable") to (Position of Unit (Variable)) over (time) seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
OR if you respawn the units at a certain fixed location, put a point there and use that instead of Position of unit. If neither of these will/can work, make a variable (point), set it to the position of the unit where it's supposed to respawn, and re-use that variable instead of position of unit.
If you still have trouble, mind copying your triggers into your next post or posting a screenshot?
@HeyRevolver: Go
1) owner of triggering unit != Number of Neutral player <== condition
2) use last created unit instead.
Thank you guys so much for the responses! I got both things to work!