Im not sure, though if you are trying to set up your mechs with a Torso Twist effect thats decupled from the leg rotation the best way that I can think of would be to make the top 1/2 of the mech a turret... This way you can set the rotation to follow that of the body/keep looking at a unit or point/reset to a default angle/lots of other crazy effects all while following the motion set about by over-riding animation... Also turrets can have pitch (though none of the models I have looked at seem to have a bone to support it so GL experimenting!)
Alternatly you could have two actors (one for the bottom 1/2 one for the top 1/2 and attach one to the other set to not inherit rotation (though this WONT turn the top 1/2 at all when the bottom turns and that kinda floating effect proberbly isnt what your looking for?
Customising the 'look at' direction of an actor works ok as well, and you can edit it to turn what ever points you want (head/chest/eyes/etc to what ever % you want... cant rember where in the data editor you create new presets for this but its somewhere in advanced and is not 2 hard 2 find...) however when the unit turns it resets the look direction untill turning finshes. At this point it will begin look again but this wont give you the effect I think you are looking for...
Sorry if I missed what you were asking, not 100% sure from the description so im just infrencing what ive seen ya wright about in other posts.
I want to make unit that will look(face direction) with its torso where my mouse cursor is placed. Face the direction of mouse cursor. All the time(not just when I click).
Same as in Wc3 lock body part (chest) to face (direction).
Possible ?
The following will create an effect similer to that in the video (the initial instructions will give you a similer look and let you see whether its what your aiming for, the later instructions will show you ONE possible method of achieveing a very similer gameplay effect to that in the video
Create a map with a bunch of enimy supply depos spotted round it, and give yourself a siege tank (tank mode)
Modify the siege tank in the data editor according to the following
Weapon Modification: "Data Editor->Weapons->Terran->Sige Tank - 90mm Cannons"
Set 'Weapon - Acquire Prioritization' = Angle
Set 'Weapon - Allowed Movement' = Moving
Set 'Weapon - Options' = 'Can Initiate Attack' (THIS IS THE ONLY ONE THAT SHOULD BE TICKED!)
Set 'Fidget +'->Chance array to be 0 on turn, 50 on the other two (To stop the dam idle spin!!!)
(Also for the fun of it in Weapon change 'Effect - Effect' = 'Banshee - Screecher Missiles (Persistent)' for some idea of how it will look when shooting a missile rather than an instante damage effect.
This will show you the effect on the turret angle/shooting controls that my method will have, but it wont demonstrate the effect of the grid of cubes creating mouse position detection or the custom unit for the missile allowing the missile to fly past the targeted grid and continue untill entering range of a acceptable unit.
In the following post I have an alot more detailed (but but un tested) method of creating the completed effect in the sample video!
Edit: If you are an admin and try the following, please take screen shots and fill out this post with them... I dont have the time at the moment (an will not likely get the time to play with the editor for a while so it may never come from me...
If your still here either your insane (didnt try the first 1/2 and think 'ill just skip that bit') or insane (actualy want the effect and are willing to read a page of block text w/o a single screen shot to guide you!!!)
This is a long one, I should have done a tutorial but I’m supposed to be studying for my HCI exam and procrastination doesn’t stretch that far! Excuse the spelling or correct if your admin and you REALY want!!!
It can defiantly be done... the first way I can think of to create the effect in the video is REALY bad practice, but hay, that just makes it all the more fun to implement!
For a top down (no issues with mouse over sky) like the one in the demo I would grid out the floor in nearly invisible units (say alpha at 100%) (About 1/2 to 1/3 size XY and 1/10 size Z cube should do the trick) Tricky distinction alert!!! If there is no model then your mouse wont fire a highlighted event, but if there’s a model at 100% alpha, then there’s a model even though you cant see it
Then you have a trigger
Event:
Unit is highlighted (any unit)
Action:
Set unit 'highlighted unit' to trigger unit
Set int 'targeting player' to trigger player
Set unit 'origin unit' to mech[targeting player] unit mech[15] is a global array with index n housing player n's mech.
Now you know who’s mech is shooting, which grind square is being shot, and the player doing this violence! All you need to do is create a unit order to attack the offending square!!! (with your unit)
Now you need to create a turret/weapon so you can get the effect you want when you order your mech to shoot the offending grid square!
Weapon Instructions:
Create a weapon that is similer to the siege tank example above.
Experiment with the 'Weapon - Options' untill your weapon atacks when/what it is told, but ONLY when it is told to (and attack is not stopped by movement)
If (AND ONLY IF!!!) you fail to achieve this you will have to find another way of flagging a target for attack (such as making the grid square you wish to attack (and only that square) robotic, then makeing the tank auto attack as in the siege tank example, then simply set 'Weapon - Scan filters' = Robotic (Required). This is less direct than giving an attack order, therefore IF 'Weapon - Allowed Movement' dosnt prevent attack orders being wiped by move orders, this should still give you what you want...
Turret Instructions:
Create a turret that is similer to the siege tank example above
Mix it up as you see fit (at some point try 'Idle' = Spin... trust me, its worth it!)
Now for your effect (The missile that you fire and the things controlling it)!!!
You want to create a 'Launch Missile' effect (look at the Effects->Terran->Launch Missile->'Banshee - Screecher Missiles (Launch Missile)' effect for inspiration but be wary, the banshee weapon uses a persistent effect to create two rockets (Aformentioned effects) out of sync with each other... ignore this step and pretend the banshee weapon creates its (Launch Missile) effect directly NOT via a (Persistent) effect (or better yet change it so that it does!!!)
Ok... so you wana make a 'Launch Missile' effect, its unit is gona be special! Where the banshee creates a unit (Weapon - Banshee) that has a mover (Banshee LM Weapon) with a driver of type guided (allowing it to home in on the target) you will make a unit with a mover driver that’s type throw (with accelleration/accelleration range/gravity/speed range = 0, max speed/min speed/speed = 2 (to start with!!! once it all works set higher!), Throw Vector X=0,Y=-1 (Note that negative Y is the turrets direction, positive T is facing away from the turret) this is not all you will want to/can do with your mover but its the basics! This should cause your missile to continue in the intended direction untill you want it to die (either by a leave region trigger event... a mover timeout... a duration effect... you pick!
Now... to make this missile of death do something... currently it will carry on until it hits its target (which it cant do because its impact range is 0 and it has no way of aiming towards the impact point, so it will never be at the right height (could be wrong here if it can hit add a slight offset to the X throw vector in your mover to throw it off in the XY)!
You want to give (missile effect) teeth by creating scan (a Persistent effect) set scan to be your ('Launch Missile' effect)'s 'Effect - Launch Effect' effect
Persistant Effect (Will priodicly launch a search effect):
Scan will have a period count of -1 (this should give it infinite!)
A duration of 0 (this should min out at 1/16 of a second)
A period effect of searchAndDistory (Search Area effect) that you are soon to create)
As a nasty hack give an initial delay so that the missile can get away from your mech w/o targeting it, there are good ways to fix this with velitors and flags in the later events but play with them once you have the rest working
Search Area Effect (Will search a small area around the missile for potential targets):
searchAndDistory (Search Area effect) radius = distance you want to kill things within
exclude self (the Missile) from the search effect
either set an effect validater to ignore your good friend the grid squares! or for a quick hack set them to say... robotic... and set the search filter to ignore robotic...
Set Effect (What happens when your search and distory picks up a target!):
now you want to give your searchAndDistory effect a (set) effect that will do two effects on anyone it finds... a damage (if its AOE (at target if you want it centred on the found unit, or at source if you want it centred on the missile) otherwise at target!...
the 2nd effect will be a damage as well... it will do a Neutral->Damage->Suicide (Kill Self - Generic) to destroy the missile... OR if you wana have the missile just blast right on through and continue its destruction don’t have the 2nd effect... see if I care!
While we are talking about sets, you can have the Weapon fire multiple types of ammo (by having a effect thats a set containing multiple 'Launch Missile' effects, to fire ammo in multiple directions by haveing a set that firest 3 different 'Missile Launch' effects each with units that have movers differing according to the following... (with movers that have Throw Vector X values of .5, 0, -.5 you will achieve ammo that fires in a spread (like you see in old school arcade games when your weapon powers up!)) Alternatly you could achieve this but having an offset in the impact location (this way will change the angle of the spread based on how close your mouse is to the mech as spread = fixed distance difference at target rather than fixed angle difference at launch angle)
Edit: Model colission detection awareness week post of the day! You can detect when your mouse is over a model by using the hilighted/selected/clicked events!!! This has disadvantages (as you must have a cursor up to do so, and there is no way to force the cursor to move to or stay at the centre of the screen) but it has some neche uses... And can do something that testing for tracelines intersecting with regions cant... model detection rather than 'is cam angle intersecting a cylinder' detection... There are uses but not many if you want mouse controlled look (so dont go thinking world of halocraft on me!)
If however you feel like making world of halo craft in spite of my warning!!! feel free to pendition for a QueryScreen(X,Y) function, the model detection code for it is already there for mouse selection blizzard just hasnt thought to put in manual control, (without a beta key I cant pendition for it myself so my tantrums are restricted to the mapster forums!)
I'm pretty sure you'll have to wait for sc2 model editing to become more viable for the independent torso rotation. The guy working on the tool for this is coming along pretty well, so it shouldn't be too long.
if I lock torso of unit to face something. Will it ignore all animations that locked bone(center bone) is using ?
@tigerija: Go
Im not sure, though if you are trying to set up your mechs with a Torso Twist effect thats decupled from the leg rotation the best way that I can think of would be to make the top 1/2 of the mech a turret... This way you can set the rotation to follow that of the body/keep looking at a unit or point/reset to a default angle/lots of other crazy effects all while following the motion set about by over-riding animation... Also turrets can have pitch (though none of the models I have looked at seem to have a bone to support it so GL experimenting!)
Alternatly you could have two actors (one for the bottom 1/2 one for the top 1/2 and attach one to the other set to not inherit rotation (though this WONT turn the top 1/2 at all when the bottom turns and that kinda floating effect proberbly isnt what your looking for?
Customising the 'look at' direction of an actor works ok as well, and you can edit it to turn what ever points you want (head/chest/eyes/etc to what ever % you want... cant rember where in the data editor you create new presets for this but its somewhere in advanced and is not 2 hard 2 find...) however when the unit turns it resets the look direction untill turning finshes. At this point it will begin look again but this wont give you the effect I think you are looking for...
Sorry if I missed what you were asking, not 100% sure from the description so im just infrencing what ive seen ya wright about in other posts.
Tnx, I appreciate your help.
Ok I will be more direct with this.
I want to make unit that will look(face direction) with its torso where my mouse cursor is placed. Face the direction of mouse cursor. All the time(not just when I click). Same as in Wc3 lock body part (chest) to face (direction). Possible ?
Here's and example: (turn off the music...)
The following will create an effect similer to that in the video (the initial instructions will give you a similer look and let you see whether its what your aiming for, the later instructions will show you ONE possible method of achieveing a very similer gameplay effect to that in the video
Create a map with a bunch of enimy supply depos spotted round it, and give yourself a siege tank (tank mode)
Modify the siege tank in the data editor according to the following
Weapon Modification: "Data Editor->Weapons->Terran->Sige Tank - 90mm Cannons"
Turret Modification: "Data Editor->Turrets->Siege Tank"
(Also for the fun of it in Weapon change 'Effect - Effect' = 'Banshee - Screecher Missiles (Persistent)' for some idea of how it will look when shooting a missile rather than an instante damage effect.
This will show you the effect on the turret angle/shooting controls that my method will have, but it wont demonstrate the effect of the grid of cubes creating mouse position detection or the custom unit for the missile allowing the missile to fly past the targeted grid and continue untill entering range of a acceptable unit.
In the following post I have an alot more detailed (but but un tested) method of creating the completed effect in the sample video!
Edit: If you are an admin and try the following, please take screen shots and fill out this post with them... I dont have the time at the moment (an will not likely get the time to play with the editor for a while so it may never come from me...
If your still here either your insane (didnt try the first 1/2 and think 'ill just skip that bit') or insane (actualy want the effect and are willing to read a page of block text w/o a single screen shot to guide you!!!)
This is a long one, I should have done a tutorial but I’m supposed to be studying for my HCI exam and procrastination doesn’t stretch that far! Excuse the spelling or correct if your admin and you REALY want!!!
It can defiantly be done... the first way I can think of to create the effect in the video is REALY bad practice, but hay, that just makes it all the more fun to implement!
For a top down (no issues with mouse over sky) like the one in the demo I would grid out the floor in nearly invisible units (say alpha at 100%) (About 1/2 to 1/3 size XY and 1/10 size Z cube should do the trick) Tricky distinction alert!!! If there is no model then your mouse wont fire a highlighted event, but if there’s a model at 100% alpha, then there’s a model even though you cant see it
Then you have a trigger
Now you know who’s mech is shooting, which grind square is being shot, and the player doing this violence! All you need to do is create a unit order to attack the offending square!!! (with your unit)
Now you need to create a turret/weapon so you can get the effect you want when you order your mech to shoot the offending grid square!
Weapon Instructions:
Turret Instructions:
Now for your effect (The missile that you fire and the things controlling it)!!!
You want to create a 'Launch Missile' effect (look at the Effects->Terran->Launch Missile->'Banshee - Screecher Missiles (Launch Missile)' effect for inspiration but be wary, the banshee weapon uses a persistent effect to create two rockets (Aformentioned effects) out of sync with each other... ignore this step and pretend the banshee weapon creates its (Launch Missile) effect directly NOT via a (Persistent) effect (or better yet change it so that it does!!!)
Ok... so you wana make a 'Launch Missile' effect, its unit is gona be special! Where the banshee creates a unit (Weapon - Banshee) that has a mover (Banshee LM Weapon) with a driver of type guided (allowing it to home in on the target) you will make a unit with a mover driver that’s type throw (with accelleration/accelleration range/gravity/speed range = 0, max speed/min speed/speed = 2 (to start with!!! once it all works set higher!), Throw Vector X=0,Y=-1 (Note that negative Y is the turrets direction, positive T is facing away from the turret) this is not all you will want to/can do with your mover but its the basics! This should cause your missile to continue in the intended direction untill you want it to die (either by a leave region trigger event... a mover timeout... a duration effect... you pick!
Now... to make this missile of death do something... currently it will carry on until it hits its target (which it cant do because its impact range is 0 and it has no way of aiming towards the impact point, so it will never be at the right height (could be wrong here if it can hit add a slight offset to the X throw vector in your mover to throw it off in the XY)!
You want to give (missile effect) teeth by creating scan (a Persistent effect) set scan to be your ('Launch Missile' effect)'s 'Effect - Launch Effect' effect
Persistant Effect (Will priodicly launch a search effect):
Search Area Effect (Will search a small area around the missile for potential targets):
Set Effect (What happens when your search and distory picks up a target!):
While we are talking about sets, you can have the Weapon fire multiple types of ammo (by having a effect thats a set containing multiple 'Launch Missile' effects, to fire ammo in multiple directions by haveing a set that firest 3 different 'Missile Launch' effects each with units that have movers differing according to the following... (with movers that have Throw Vector X values of .5, 0, -.5 you will achieve ammo that fires in a spread (like you see in old school arcade games when your weapon powers up!)) Alternatly you could achieve this but having an offset in the impact location (this way will change the angle of the spread based on how close your mouse is to the mech as spread = fixed distance difference at target rather than fixed angle difference at launch angle)
Edit: Model colission detection awareness week post of the day! You can detect when your mouse is over a model by using the hilighted/selected/clicked events!!! This has disadvantages (as you must have a cursor up to do so, and there is no way to force the cursor to move to or stay at the centre of the screen) but it has some neche uses... And can do something that testing for tracelines intersecting with regions cant... model detection rather than 'is cam angle intersecting a cylinder' detection... There are uses but not many if you want mouse controlled look (so dont go thinking world of halocraft on me!)
If however you feel like making world of halo craft in spite of my warning!!! feel free to pendition for a QueryScreen(X,Y) function, the model detection code for it is already there for mouse selection blizzard just hasnt thought to put in manual control, (without a beta key I cant pendition for it myself so my tantrums are restricted to the mapster forums!)
I'm pretty sure you'll have to wait for sc2 model editing to become more viable for the independent torso rotation. The guy working on the tool for this is coming along pretty well, so it shouldn't be too long.
I think I can already made model required for that. But I dont know how i need to name parts. Anyway...
Umbra, can you do it for me ? I havent used GE, dont have time for it at all. I can create models and everything, but I am not working in GE.
Top down can be made by TPS camera. You can just zoom camera out.
Anyone ? Can you order torso to face direction like in wc3 ?