I should explain the events are fine as I am able to move the turret via HARDCODED values. Im just trying to figure out how to get the camera angle/rotation into compatible numbers that AttachSetRotation accepts.
I noticed the values that I sent hard coded are very small (like 0.7071) and the camera values I get are much bigger like 60 at some views
Got your map, all I have to say is DAMN. I was doing the EXACT same thing, but the camera kept jumping!
anyways, I made the whole trigger a few lines shorter (you really like making triggers longer eh? lol)
also finnaly finnished the whole sprint thing. .. just one thing, you need to go in the data editor and change the units max speed, because these guys you are using are SLOW!!
@BudSMoken: Go
go to your weapons, and find your two goldbaneling weapons called
Volatile Burst (actual weapon) and VolatileBurst15scanrange(actual weapon),
and find the spot "Minimum scan range"
change that to 10.
You have it set to 1 right now.
I am able to use AttachSetRotation, using hard coded numbers :
-0.7071, 0, -0.7071, -0.7071, 0, -0.7071
which makes it face about 45 degrees in the air at some odd rotaion
or
0, 0, 0, 0, 0, 0
which makes the turret face squarely towards the middle of the side of the map.
Anyways, the question:
How do I create variables to take the camera position for example, and convert it into numbers AttachSetRotation undertsands?
I currently use two sets, the first is Getpolar (of camera yaw) and the second is GetPosition of Unit...
But it wont take those numbers when running, the turret just sits still.
(I have tested the variables, they are actively updating, Ive also used them to face a unit before and worked fine... So im sure its some sort of conversion I need.
uh I got a question, I just noticed what you ment by that, If I have the camera control the facing of the unit, and the mouse control the camera, then I dont need the UP/DOWN to change the way the camera looks right? If thats the case, I will keep my UP/DOWN code as is and add the mouse to camera support.
Dont know... If you want this or not, but I also added UP, DOWN, LEFT, RIGHT keys to your WASD triggers. That way you can move your unit with either set.
wow... Also, you have like 50 million lines, just to make a unit move faster aka Run... I am going to take that out and put in a few lines that just change the current units movement properties!! (and since the wasd system uses the units movement , you will effectively move faster.
I got your map, I will continue to update you what I found wrong and fixed via this thread so everyone else may learn.
So far:
cool... I see you created my PlayerUnit variable and set that to UnitLastCreated. However you set this BEFORE you created the unit. I moved this right after your create unit command.
okay... Your camera triggers are actually pretty decent, however I have a set of triggers, that:
A. Contain about half the code.
B. Contain about half the triggers and variables
Will be more efficient.
simple,
I assume you select this unit through some menu, built off of triggers,
create a variable called "PlayerUnit" and set it from "integer" to "unit" (make sure this variable is not "inside" a trigger but outside, if you want to call on this variable from other triggers.)
Find the spot in your trigger work, where you actually create said unit, then create an action "setVariable" and set "PlayerUnit" to "UnitLastCreated"
And from that point on you can call "LastCreatedUnit" to get your unit.
If you would like to set PlayerUnit, to whatever unit you select with the mouse, just create another trigger, give it an event called "TriggerAddEventUnitSelected"
then in the actions you will create an action "setVariable" and set "PlayerUnit" to "EventUnit"
I will document every piece of code for you to give you an idea of what everthing does. It wont be much, as all the code put together is only about 20 lines max.
(btw, whenever your looking for an event, condition, or action, try the search bar above the list. This will help you find stuff that has weird stuff in front of what your looking for like like TriggerAddEventUnitSelected
If you would like, send me the map, I will put in triggers that will have the camera follow any unit you select, also, your unit will face in the direction of your camera, so if you rotate your screen your unit rotates with it, so it is always facing away from you, as if it was a firstpersonshooter.
he's right for example, if you position three units in a triangle a healthy distance from each other but close enough, if you approach the closest one, all units "in range" of the unit, will respond. even though, the other units were BEHIND, the unit you approached.
0
@DrSuperEvil: Go
I sent the map via pm if you dont mind.
I should explain the events are fine as I am able to move the turret via HARDCODED values. Im just trying to figure out how to get the camera angle/rotation into compatible numbers that AttachSetRotation accepts.
I noticed the values that I sent hard coded are very small (like 0.7071) and the camera values I get are much bigger like 60 at some views
0
@baca25: Go
Got your map, all I have to say is DAMN. I was doing the EXACT same thing, but the camera kept jumping!
anyways, I made the whole trigger a few lines shorter (you really like making triggers longer eh? lol)
also finnaly finnished the whole sprint thing. .. just one thing, you need to go in the data editor and change the units max speed, because these guys you are using are SLOW!!
I sent the map to you via pm. enjoy.
0
Lol, that was EXACLTY what I was talking about!!! alright Ill Finnish getting that for you .
(I don't know why I almost pressed ctrl+F9 to press the reply button. Too much starcraft map testing!!!)
0
@BudSMoken: Go go to your weapons, and find your two goldbaneling weapons called Volatile Burst (actual weapon) and VolatileBurst15scanrange(actual weapon), and find the spot "Minimum scan range" change that to 10. You have it set to 1 right now.
I noticed you work with actor messages and rotation, could you please explain AttachSetRotation I described the issue here http://forums.sc2mapster.com/development/data/21646-turret-rotation-solved-just-one-question/?post=1 thank you
0
I send you a pm with a link to the file, please download and tell me if you can work with it. (I dont quite understand your camera system just yet)
0
Okay... So the left and right turns the "car" and up and down changes the cameras view, down and up correct?
0
I am able to use AttachSetRotation, using hard coded numbers : -0.7071, 0, -0.7071, -0.7071, 0, -0.7071 which makes it face about 45 degrees in the air at some odd rotaion or 0, 0, 0, 0, 0, 0 which makes the turret face squarely towards the middle of the side of the map.
Anyways, the question: How do I create variables to take the camera position for example, and convert it into numbers AttachSetRotation undertsands?
I currently use two sets, the first is Getpolar (of camera yaw) and the second is GetPosition of Unit... But it wont take those numbers when running, the turret just sits still.
(I have tested the variables, they are actively updating, Ive also used them to face a unit before and worked fine... So im sure its some sort of conversion I need.
0
@ibebusiness: Go
uh I got a question, I just noticed what you ment by that, If I have the camera control the facing of the unit, and the mouse control the camera, then I dont need the UP/DOWN to change the way the camera looks right? If thats the case, I will keep my UP/DOWN code as is and add the mouse to camera support.
0
@baca25: Go
oh, its a 2 second change, I will just switch the two up/down buttons!
0
@baca25: Go
Dont know... If you want this or not, but I also added UP, DOWN, LEFT, RIGHT keys to your WASD triggers. That way you can move your unit with either set.
wow... Also, you have like 50 million lines, just to make a unit move faster aka Run... I am going to take that out and put in a few lines that just change the current units movement properties!! (and since the wasd system uses the units movement , you will effectively move faster.
0
@ibebusiness: Go
I got your map, I will continue to update you what I found wrong and fixed via this thread so everyone else may learn.
So far: cool... I see you created my PlayerUnit variable and set that to UnitLastCreated. However you set this BEFORE you created the unit. I moved this right after your create unit command.
okay... Your camera triggers are actually pretty decent, however I have a set of triggers, that: A. Contain about half the code. B. Contain about half the triggers and variables Will be more efficient.
0
Got it working!
0
simple, I assume you select this unit through some menu, built off of triggers,
create a variable called "PlayerUnit" and set it from "integer" to "unit" (make sure this variable is not "inside" a trigger but outside, if you want to call on this variable from other triggers.)
Find the spot in your trigger work, where you actually create said unit, then create an action "setVariable" and set "PlayerUnit" to "UnitLastCreated"
And from that point on you can call "LastCreatedUnit" to get your unit.
If you would like to set PlayerUnit, to whatever unit you select with the mouse, just create another trigger, give it an event called "TriggerAddEventUnitSelected" then in the actions you will create an action "setVariable" and set "PlayerUnit" to "EventUnit"
I will document every piece of code for you to give you an idea of what everthing does. It wont be much, as all the code put together is only about 20 lines max.
(btw, whenever your looking for an event, condition, or action, try the search bar above the list. This will help you find stuff that has weird stuff in front of what your looking for like like TriggerAddEventUnitSelected
If you would like, send me the map, I will put in triggers that will have the camera follow any unit you select, also, your unit will face in the direction of your camera, so if you rotate your screen your unit rotates with it, so it is always facing away from you, as if it was a firstpersonshooter.
0
he's right for example, if you position three units in a triangle a healthy distance from each other but close enough, if you approach the closest one, all units "in range" of the unit, will respond. even though, the other units were BEHIND, the unit you approached.
0
xSteamGearx, forcing the actor will make the tank itself face the point, not the turret by itself. Thank you though.