I can't quite figure out how to move the camera through triggers.
I basically want to move the CAMERA with WASD instead of the arrow keys. Either through a " When W=Pressed. Move to X,Y offset by current position " or if it's possible to just re-bind W = Up Arrow. Does anyone have any other ideas/solutions? Since Im just brainstorming atm ^^
Do you want this to be permanent through all maps that you play, or just on your particular map?
If it's for every one of them..
SC2 Game
Open SC2 -> Go to Options -> Hotkey and scroll down til you find Camera.
SC2 Editor
Open SC2 Editor -> File -> Configure Controls -> Camera category.
If that's not what you're looking for, possibly use the unit based WASD movement and have the camera linked to an invisible unit.
I bet you want it to work for anyone playing your map, so what Feithless suggested might only work for you... Anyone downloading your map won't have these settings. :(
Anyway, I think what you want should work exactly the same way as using WASD for a unit, as Feithless also said. Create a camera on your map, and create triggers that will pan the camera to: actual position of the camera + small offset in the direction bound. Make some variables that will check if a key is still pressed (the more often you check, the more precise it is... unfortunately it is also more laggy, especially on Bnet), and repeat the camera movement process if so.
EDIT: I searched the link to the tutorial I used for WASD movement on my own custom map, but it seems to have been removed/updated with another method (obviously better, since the old one was laggy). Anyway, there are at least 3 ways to do a WASD movement, and each are explained on SC2Mapster... The method using Data editing might not work to move a camera, but you're free to try (who knows... it's an Actor like everything else, I guess!).
I think I'll start off with doing what Feithless said just so see if it feels good with the WASD movement to begin with ^^. If it does I'll go with the invisible unit and have the camera following him, moving him by WASD. Since it's something I'm familiar with, hehe.
I'll update this post if I come up with some z0mgawez0meLaz0rzz solution.
You don't need any invisible unit. In fact, that's even worse because it may lag even more, and the more interactions you had the more bugs you may find (why do A>B>C when you can do A>C?). An invisible unit does collide, or at least dodges obstacles (doodads, units, cliffs etc...) so if you focus a camera on it, you may see some weird movements of your camera from time to time. It might even get blocked if the invisible unit can't move for any reason whatsoever. Trigger-based WASD movement is the easiest method for you to start with. I'll give it a try with a camera instead of a unit and will upload it as soon as I get it to work.
Basically, it locks your camera and only allows to move it with WASD. The first move is weird (bad scripting obviously), but aside from that it works. It's not the best method at all (laggy, buggy, and not tuned to work fluently), but it will show you how it works.
Yeah, Im aware of the lagg issue. It's just that it would be the easiest to do with my current knowledge, and I really need to get started ^^
I'm trying to pan the camera to a point with polar offset ( Paning laggs and sucks, but I can't think of anything else. ) , I just can't for the life of me seem to get the cameras current position/point.
( I'm sure it will all fall into place, and I'll slap myself silly for being so stupid once Rapidshare stops giving me a hard time! ) *raises fist*
EDIT: The map was awesome, exactly what I was looking for. Just have to tweak and see how it holds up in multiplayer. Full cred ofc If I use it in my map. =) THANKS
Actually, full credit goes to Deliverancelost (he wrote the tutorial about 8-ways WASD control)... I just tweaked the thing a bit so that it would work for a camera instead of a unit. It isn't much.
You don't need any invisible unit. In fact, that's even worse because it may lag even more, and the more interactions you had the more bugs you may find (why do A>B>C when you can do A>C?). An invisible unit does collide, or at least dodges obstacles (doodads, units, cliffs etc...) so if you focus a camera on it, you may see some weird movements of your camera from time to time. It might even get blocked if the invisible unit can't move for any reason whatsoever. Trigger-based WASD movement is the easiest method for you to start with. I'll give it a try with a camera instead of a unit and will upload it as soon as I get it to work.
Yeah, I was trying to figure out how to do it so I could post it in my first post, but I got confused as I don't work with the cameras often and decided to just go with that.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I can't quite figure out how to move the camera through triggers.
I basically want to move the CAMERA with WASD instead of the arrow keys. Either through a " When W=Pressed. Move to X,Y offset by current position " or if it's possible to just re-bind W = Up Arrow. Does anyone have any other ideas/solutions? Since Im just brainstorming atm ^^
Thanks in Advance.
@jakpe: Go
Do you want this to be permanent through all maps that you play, or just on your particular map?
If it's for every one of them..
SC2 Game
Open SC2 -> Go to Options -> Hotkey and scroll down til you find Camera.
SC2 Editor
Open SC2 Editor -> File -> Configure Controls -> Camera category.
If that's not what you're looking for, possibly use the unit based WASD movement and have the camera linked to an invisible unit.
I bet you want it to work for anyone playing your map, so what Feithless suggested might only work for you... Anyone downloading your map won't have these settings. :(
Anyway, I think what you want should work exactly the same way as using WASD for a unit, as Feithless also said. Create a camera on your map, and create triggers that will pan the camera to: actual position of the camera + small offset in the direction bound. Make some variables that will check if a key is still pressed (the more often you check, the more precise it is... unfortunately it is also more laggy, especially on Bnet), and repeat the camera movement process if so.
EDIT: I searched the link to the tutorial I used for WASD movement on my own custom map, but it seems to have been removed/updated with another method (obviously better, since the old one was laggy). Anyway, there are at least 3 ways to do a WASD movement, and each are explained on SC2Mapster... The method using Data editing might not work to move a camera, but you're free to try (who knows... it's an Actor like everything else, I guess!).
Thanks guys!
I think I'll start off with doing what Feithless said just so see if it feels good with the WASD movement to begin with ^^. If it does I'll go with the invisible unit and have the camera following him, moving him by WASD. Since it's something I'm familiar with, hehe.
I'll update this post if I come up with some z0mgawez0meLaz0rzz solution.
Thanks, again ^^
you can also do it through triggers.
this tutorial is how to make a unit move with WASD, but you can apply the same principle to camera.
to make it work for all players, just use a 15 array and have your action definitions use integer parameters for player
@jakpe: Go
You don't need any invisible unit. In fact, that's even worse because it may lag even more, and the more interactions you had the more bugs you may find (why do A>B>C when you can do A>C?). An invisible unit does collide, or at least dodges obstacles (doodads, units, cliffs etc...) so if you focus a camera on it, you may see some weird movements of your camera from time to time. It might even get blocked if the invisible unit can't move for any reason whatsoever. Trigger-based WASD movement is the easiest method for you to start with. I'll give it a try with a camera instead of a unit and will upload it as soon as I get it to work.
EDIT: I should be ashamed of uploading such a map, but here it is...
http://rapidshare.com/files/429758046/testWASDcamera.SC2Map
Basically, it locks your camera and only allows to move it with WASD. The first move is weird (bad scripting obviously), but aside from that it works. It's not the best method at all (laggy, buggy, and not tuned to work fluently), but it will show you how it works.
@ZealNaga:
Thanks for the answer, once again.
Yeah, Im aware of the lagg issue. It's just that it would be the easiest to do with my current knowledge, and I really need to get started ^^
I'm trying to pan the camera to a point with polar offset ( Paning laggs and sucks, but I can't think of anything else. ) , I just can't for the life of me seem to get the cameras current position/point.
( I'm sure it will all fall into place, and I'll slap myself silly for being so stupid once Rapidshare stops giving me a hard time! ) *raises fist*
EDIT: The map was awesome, exactly what I was looking for. Just have to tweak and see how it holds up in multiplayer. Full cred ofc If I use it in my map. =) THANKS
Actually, full credit goes to Deliverancelost (he wrote the tutorial about 8-ways WASD control)... I just tweaked the thing a bit so that it would work for a camera instead of a unit. It isn't much.
Yeah, I was trying to figure out how to do it so I could post it in my first post, but I got confused as I don't work with the cameras often and decided to just go with that.