Shandy6661 Posted June 21, 2015 Share Posted June 21, 2015 Hi everyone, i recently had unsolved problem (yet). in my project the player had different system to default player system. in my project the player is need aim system like in this picture http://s.pro-gmedia.com/videogamer/media/images/xbox360/resident_evil_6/screens/resident_evil_6_48.jpgby default the player system is already similar,but i have changed the default player system similar to this picturehttp://i.imgur.com/kVBkQWy.jpg(but the player still can shoot everytimes i press the left mouse button)the questions is -how to make a aim system?-how to make the player characters do aim system and had camera that follow the weapon's direction by pressing certain button(for example "Right mouse Button"?-how to make the player disallowed to shoot and had orbit camera style(EYE node as the offset) if the player didnt press the "Right Mouse Button"?-Which script that i have to use to make it possible? C++ or TorqueScript? Quote Link to comment Share on other sites More sharing options...
saindd Posted June 22, 2015 Share Posted June 22, 2015 Take a look at this:https://www.garagegames.com/community/resources/view/22296 Quote Link to comment Share on other sites More sharing options...
Shandy6661 Posted June 27, 2015 Author Share Posted June 27, 2015 i already used that resource, thats i show you the first pictures,all i looking for is how to set the orbit camera style at moment and the AIM System Quote Link to comment Share on other sites More sharing options...
irei1as Posted June 27, 2015 Share Posted June 27, 2015 I think the easiest way to tackle the aim system is with a global variable defined inside the bind of the right click with something like:(in the file default.bind.cs) $aimsystemflag=false; //This initializes the aim system. You may want to initialize it when each level is restarted, too. function aimsystem(%val) { $aimsystemflag=%val; //when you hold right click you enter 'true' and when you realease it it goes 'false' if(%val) { //you do other stuff of starting aiming //here may go the change perspective } else { //here you've ended aiming //do quitting aiming stuff like change perspective back to normal } } moveMap.bind( mouse, button1, aimsystem ); //change 'moveMap' with your Move map if needed //button1 is the right click of the mouse This way you know $aimsystemflag is only true when aiming.So inside the shot function you can use an if statement checking if that's true or false and act accordingly.Now, about changing the eye node... There's a method for TSShapeConstructor to change the location of the a node (like the eye node), bool TSShapeConstructor::setNodeTransform( string name, TransformF txfm, bool isWorld = false ) But I don't know how to use it or if it can be used at run time to change a node in the player as it has a client/server thing, sorry.Maybe other more experienced user than me can explain its posible use. Quote Link to comment Share on other sites More sharing options...
buckmaster Posted July 5, 2015 Share Posted July 5, 2015 You could also use the weapon image state machine's alternate fire trigger as a 'trigger guard' of sorts to prevent it from shooting unless you're also aiming. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.