My little fps problem

Hello I’m attempting to make a simple fps now, just walking around and shooting boxes basicly…But i can’t figure out how to aim the gun…likeI’ve made a cursor thing and i want the gun to like follow it just by rotateing, kind of like in socials template…I’ve tryed searching for tutorials everywhere and i can’t figure out how to do this…thanks in andvance and sorry for my newby question

try searching for mouselook script

ummm k i’ll try that…where like on google? thanks for your reply…ahhh yess!!! thank you so much i was searching for like mouse cursor and stuff i didn’t think of mouse look…sorry bout that…thanks alot=D

Ok…problems back lol…i tryed the script and it works fine but now i want my character to rotate along the z axis along with it but I’m unsure of how to do this…any suggestions? Thanks in advanced

You can study the method used in the FPS_template.

not really a suggestion or anything but the title of this thread reminds me of the 3 amigos “my little buttercup”…

lol shmunkyman that’s kinda funny…and social i tryed to study your template…it’s hard for me to find that stuff…considering i can’t find your scripts or anything…good template though… I’m kinda too stupid to figure it out that way i had the template out for like 45 minutes trying to find it…I will try again…and thanks guys!K…i tryed again and I’m not even sure which object to look at sorry

Hey Chirpy! (if I may call you that…)

To view, write, or edit scripts, open the scripts window (f11).

Yeah, a mouse look script is what you’ll want. Then parent the gun to the camera.

At this point, what I would do is just use the template, create your own gun, environment, ect, instead of trying to start from scratch. The template works well, and has some “advanced” abilities (bullet holes, ect.) that will be difficult to remake. If you want some further help or advice, PM me. I know where you’re coming from.

Good luck! ~~Stu_Flowers

my little buttercup has the sweetest smiiiiiillle…
yes use the mouse look script from here: http://www.blender.org/documentation/pydoc_gameengine/PyDoc-Gameengine-2.34/Rasterizer-module.html

thats where it is, I was looking for it at one point
I keep on forgetting were everything is now a days

ummmm…ok thanks guys I’ll try thoose out now…but i don’t want to copy socials template I want to make pretty much from scratch…I’ll learn more that way:D…but this doesn’t really help my new problem…i want my character to rotate with the gun on the z axis…Thanks again…and sorry for me being stupid lol…Hey shmunkyman that script won’t work i need to name the actuators and controllers and sensors but i don’t know how…and i already found a mouse look script…but now i need to make my character rotate with the gun…which I can’t seem to do…help please…and stu f11 won’t open the scripts window…like how do i open socials aim.py script if it is just in the controller?..i need help…oh and one more thing I’m using scabootssca’s mouse look script if that helps…thanks again

hhhmmmmm…

If f11 doesn’t open the scripts window, go to the header bar -> click the left most icon -> browse up to the scripts window button. This window will allow you to view “aim.py”, ect, that the controller is linked to.

If that doesn’t work, I don’t know how to help you there…

Post a .blend; maybe I can help you link it up!

I just basicly need to make my character follow the back end of the gun…but not rotate up and down which it does now if i parent…I’m going to try a camera actuator…thanks again…and i know how to get to the scripts window already i just can’t look at aim.py…which i don’t need now…i don’t think i do anyway…lol…Are there any fps tutorials i can’t find one…and socials template doesn’t help me…sorry social…like your templates cool but i can’t figure out how to do this…I’d also like do limit the guns up and down rotation…I JUST NEED TO MAKE MY CHARACTER SPIN AROUND WITH THE GUN HOW HARD CAN THAT BE!!!..lol sorry…frustrating…it just seems so simple…

in my experience in order to understand how to confront your issue X - which may only at first SEEM to be 2 parts big - you’ll have to do research on information that is 20 parts big or more.

THen once you figure out issue X, you’ll run into some other puzzle, at which point you will be better prepared for it, because of all the research that your first question had sparked

I learned Java Script before looking into Python, and it is helped a lot so far. Because of the 100 hours or more I spent on Java and Sphere, now I can read Python pretty intuitively and think Python, because I was thinking Java for those 100 hours.

In other words, help yourself by not relying too heavily (or at all) upon things that simply cannot be relied upon (at least exclusively) which is the advice of others.

I suggest you get in bed with some Python and logic bricks as well as blender/GE interface before you start making a FPS - I’m not trying to be rude or anything

but waiting on people to respond in a helpful way is kinda painful isn’t it?

Chirps, I need to be straightforward with you. Reading your posts is very difficult, because it seems like you want someone to give you a magic answer. Every time someone says “Try this…” you respond “I can’t do that because I don’t know how to do this, so does anyone else have my magic answer?”

Well, I don’t have your magic answer, but I am willing to answer a few of the questions you have asked.

Here is how to read Python Scripts (I know you said you know how to do that already, but just in case…):

  1. Select “Text Editor” from the Window type menu
  2. Select the .py file you wish to view from the text selection menu.
    http://img296.imageshack.us/img296/682/readpythonscripteo1.jpg
    I have no trouble viewing aim.py in the FPS template.

Here is how to change the name of a logic brick:

  1. Make sure the logic brick is expanded (that is, all of the details are showing).
  2. Click on the name field (the word “sensor” highlighted in red below).
  3. Type in the new name.
  4. Press enter.
    http://img407.imageshack.us/img407/1299/sensorchangenameda7.jpg

Now, having said that, your question is not simple at all. You need to either use a pre-existing mouselook script or write your own. The best way (in my opinion) to design a limited rotation mouselook (like you asked for) is to use IPO’s.

  1. Set up the IPO for the rotation around the Z-axis (probably a full 360 degrees) and attach it to whatever you want to rotate (usually people use an empty, since you don’t really see the character in an FPS unless there are mirrors).

  2. Make another IPO for the limited up and down rotation you want and connect it to a second empty and make the first empty its parent.

  3. Make the second empty the parent of the gun. Make the first empty the parent of the character. Now the character will only rotate on the Z-axis, but the gun will rotate on both.

  4. Give the two empties “Mouse >> Movement” sensors, then use a Python script to read the movement of the mouse pointer from the Rasterizer module on each axis and increment the respective rotation IPO with an “IPO >> Property” actuator.

That was all pretty simple up until the last step, right? Well, I could write the Python code for you, but there are at least 10 mouselook scripts that have already been written. My personal favorite is scabootssca’s. I hope you are able to remedy your problem, and I hope that I have been at least somewhat helpful to you, because I did take a considerable amount of time to answer your questions.

lol…sorry blendenzo…I’ll try this and i knew how to name the logic bricks it’s just one mouse look script that someone showed me earlier on this thread didn’t work because i didn’t know what to name them…thanks for your reply and i am using scabootssca’s mouse look script(that’s reasuring) lol thanks again:D
edit)oh it took you alot of time…now i feel bad…sorry lol but this should help alot thank you so much
edit2)ummmm sorry to do this again but you mean animate with key frames? and with the ipo actuator i just switch to property…but with scabootssca’s script doesn’t it have to be a motion actuator named rotx and roty…sorry I’m just new to the ge…and i started with simple games and now i want to make this…don’t answere me if you don’t want to go through the trouble ok…maybe i should just give up for now…i guess i don’t know enough

Lol ok 218 views 15 replies…I think that says I should just quit lol…but if anyone can ummm answere how to do this ipo thing blendenzo is talking about that’d be great(sorry i feel kinda stupid for all this)…and sorry blendenzo it sounds like you went through a little trouble to answere, and i’m sorry that i don’t understand how to make this ipo thing work…any last comments before igive up on this for now?

how will one ever learn if you just quit every time you get stuck?! :wink:

lol siegel it’s a good point but i don’t think i know enough about the ge to be atempting this now…i don’t even know how to do blendenzo’s ipo thing (if i did it would work perfectly) and he explained it in pretty great detail i think lol:D

here
Well if it isn’t too much of a bother for anyone…if you could please make an example blend of blendenzo’s idea (which sounds like it would work perfectly)…preferably with scabootssca’s mouselook script, but beggers can’t be choosers…It would be apreciatted…I’ve tryed but I don’t understand his ipo thing…Thanks again, and sorry to make you go through this trouble guys…heres what i got(best try lol) from what blendenzo said…it kinda works, but has major flaws…it’s at the top
edit: oh I’ve just relized
I double posted…sorry