Oh, ok. I see what you mean. I guess currently you either have to choose one of two compromises: shaky camera or panning camera. Unless you are able to turn off camera panning when the mouse hits the side of the screen. Ill be looking at way to fix this and get back to you if I find anything.
I currently have a version where the camera will not pan. I did this by locking the camera input from the user. Whenever i left-click it disables the lock and allows the user to move the camera. When the left-click is released, the lock is reapplied. The only downside is the user can no longer zoom in when not holding down left-click. However, that can be fixed with a simple trigger that turn the lock off when the mouse wheel is moved.
I followed the tutorial, and I seem to have one problem with it. I need the camera to follow the Unit (Archon) while he is moving, and still retaining control of the camera with the mouse. Anyone know how to do this with the camera in this tutorial?
For smooth camera movement, you need Pan Camera, which does not work with mouse look. When you turn on mouse look, the camera does not automatically move with the unit. I think you can force it to move by restricting it to a region and then moving the region as outlined here (thanks for the tutorial), but this will probably make the camera stutter badly.
......
Secondly, why not use WASD and Move Unit, then disable regular movement? This means you can disable Attack and give your hero an invisible ability that is triggered to go off when you right click on an enemy.
You don't. The tutorial uses the move order method to make the unit move. However, it can't move backwards. To do this, you need to Move Unit Instantly to a location that is the original location offset by (facing angle -180) degrees with an arbitrary distance.
You can copy/paste the move forward code, but change the key pressed to <s> and make the unit move -1 distance int direction of camera yaw. This will make it so the unit always run towards the camera when you pressed <s>.
using the given tutorial is there a way to make a unit shoot in a specific direction. not as familiar with triggers as i'd like to be. but say attach a region to the camera, mouse, or the direction the unit is facing?
EDIT: ok ive seemed to narrow it down to "Angle: Camera Yaw of Player" no longer works with "mouse and camera movement" since the last patch. "Angle: Camera Yaw of Player" only applies to your default game camera and wont be affected when moving the camera yaw around with the mouse.
As far as I narrowed it down, the function stops working when X or Y of the camera target's position become higher than 55 on my test map.
So my shooter systems just worked properly in a small area of the map (X=[0,55], Y=[0,55])
Hey, I folowed your tutorial to slowly learn how does it work... Even if some things are not explain (you have to search a little bit by yourself) I were able to do everything. Thanx. But, there is one thing that I don't know... I have check for some stupid mistakes but found nothing... My view is not folowing my Archon?
How is that your creating a global variable.... may sound stupid but i cant find where or how to make IT!>
A global variable as opposed to a local variable. Global variables are the ones you see in the same tree view as the triggers. Local variables are inside the triggers themselves.
I just found out an easy way of making the camera up close in third person AND WITHOUT THE CAMERA BEING SHAKY.
1. Follow the tutorial for third person camera creation.
2. Place a camera by the CameraView Region, (or whatever u have thats 0.25 in radius) in Terrain Editor.
3. Double click the camera in the left panel to see camera properties.
4. Go to Distance and set it to 5. (Or whatever you want)
The only problem is that if you scroll with the mouse wheel, it will go back to normal.
I'm sure this can be fixed by triggers.
Can someone explain how you all have managed to get this working, yet for some unknown reason Galaxy Editor doesnt recognize the command UnitGetHeight that all your scripts seem to use. Infact when loading the all the maps listed in this thread in Galaxy then immediatly hitting save, it says it cant save the editor because of the script error UnitGetHeight.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Oh, ok. I see what you mean. I guess currently you either have to choose one of two compromises: shaky camera or panning camera. Unless you are able to turn off camera panning when the mouse hits the side of the screen. Ill be looking at way to fix this and get back to you if I find anything.
I currently have a version where the camera will not pan. I did this by locking the camera input from the user. Whenever i left-click it disables the lock and allows the user to move the camera. When the left-click is released, the lock is reapplied. The only downside is the user can no longer zoom in when not holding down left-click. However, that can be fixed with a simple trigger that turn the lock off when the mouse wheel is moved.
I followed the tutorial, and I seem to have one problem with it. I need the camera to follow the Unit (Archon) while he is moving, and still retaining control of the camera with the mouse. Anyone know how to do this with the camera in this tutorial?
With various random additions and code stealing.... This is what I've come up with. It's not perfect
Also; Only one "bullet" can be fired until the one dies (hit's ground) so don't shoot into the air. It uses Baneling explosion and can damage units.
A lot of the code isn't very efficient, it's mostly just a mess because you'know I was messing with stuff.
@Grogian
Wow, that is one of the best 3rd person veiws ive seen. Keep up the good work.
So how close are we to true mouselook?
For smooth camera movement, you need Pan Camera, which does not work with mouse look. When you turn on mouse look, the camera does not automatically move with the unit. I think you can force it to move by restricting it to a region and then moving the region as outlined here (thanks for the tutorial), but this will probably make the camera stutter badly.
......
Secondly, why not use WASD and Move Unit, then disable regular movement? This means you can disable Attack and give your hero an invisible ability that is triggered to go off when you right click on an enemy.
how to make it move backward by pressing s
You don't. The tutorial uses the move order method to make the unit move. However, it can't move backwards. To do this, you need to Move Unit Instantly to a location that is the original location offset by (facing angle -180) degrees with an arbitrary distance.
You can copy/paste the move forward code, but change the key pressed to <s> and make the unit move -1 distance int direction of camera yaw. This will make it so the unit always run towards the camera when you pressed <s>.
using the given tutorial is there a way to make a unit shoot in a specific direction. not as familiar with triggers as i'd like to be. but say attach a region to the camera, mouse, or the direction the unit is facing?
@ladpointaron:
There's a couple ways you can do it. I scripted bullets using units and a combination of Cartesian and polar vectors.
"Camera - Camera Yaw of Player" is the key player for shooting (and moving)
@GoldfishInAPicklejar: Go
uhh I am to the part where you create an attack trigger and when I create a local variable it WILL NOT LET ME CHOOSE A GROUP!? WTF! PLZ HELP!
this does not work no matter what I try
EDIT: ok ive seemed to narrow it down to "Angle: Camera Yaw of Player" no longer works with "mouse and camera movement" since the last patch. "Angle: Camera Yaw of Player" only applies to your default game camera and wont be affected when moving the camera yaw around with the mouse.
As far as I narrowed it down, the function stops working when X or Y of the camera target's position become higher than 55 on my test map. So my shooter systems just worked properly in a small area of the map (X=[0,55], Y=[0,55])
Hey, I folowed your tutorial to slowly learn how does it work... Even if some things are not explain (you have to search a little bit by yourself) I were able to do everything. Thanx. But, there is one thing that I don't know... I have check for some stupid mistakes but found nothing... My view is not folowing my Archon?
Any idea?
Working on projects:
How is that your creating a global variable.... may sound stupid but i cant find where or how to make IT!>
A global variable as opposed to a local variable. Global variables are the ones you see in the same tree view as the triggers. Local variables are inside the triggers themselves.
@LazyCoder: Go
Im running the Galaxy Editor on the mac, maybe i have a different view.
Gunna ask a couples question to see if im in the right direction.
When creating a global vairable is it gunna be under >> new variable and if so what am i looking for exactly? EXTREMELY NEW to this
I just found out an easy way of making the camera up close in third person AND WITHOUT THE CAMERA BEING SHAKY. 1. Follow the tutorial for third person camera creation. 2. Place a camera by the CameraView Region, (or whatever u have thats 0.25 in radius) in Terrain Editor. 3. Double click the camera in the left panel to see camera properties. 4. Go to Distance and set it to 5. (Or whatever you want)
The only problem is that if you scroll with the mouse wheel, it will go back to normal. I'm sure this can be fixed by triggers.
-> Also don't forget to set the height.Can someone explain how you all have managed to get this working, yet for some unknown reason Galaxy Editor doesnt recognize the command UnitGetHeight that all your scripts seem to use. Infact when loading the all the maps listed in this thread in Galaxy then immediatly hitting save, it says it cant save the editor because of the script error UnitGetHeight.