Okay so I am trying to make a mobile game where instead of pressing a button to make a character shoot his weapon you instead just hover the cross airs over an enemy and the gun fires, but I don’t have to much experience with scripting so I was wondering if anyone can help me make the script. ![]()
Welcome to the Unity community! It’s a fun place.
Now, if you want somebody to write a script for you, you should post in the Commercial: Job Offering forum (if you are going to pay for it), or the Non-Commercial Collaboration forum (if not).
If you want to write it yourself, and just need some help, then you need to first try. Go through the tutorials (the Learn link at the top of this page is a good place to start), including the scripting ones. That will teach you the basics of scripting. Then break your problem down into smaller problems, and break those down into still smaller problems, until you have a problem small enough that you think you can tackle it. Do so. Fix any syntax or other errors you get, and include enough Debug.Logs that you can test your mental model of what the code is doing.
At that point, it’s quite likely you will have solved the sub-problem; now you can tackle the next sub-problem, and repeat until you’ve done the whole task.
But if you get stuck, and you just don’t know why the code isn’t doing what you think it should be doing, or (despite having gone through all the tutorials) you just really can’t think of how to break it down into a small enough problem to tackle… then post whatever code (or attempts at breaking it down) you have here, and we’ll help.
Good luck!
Thanks for the info I’ll definitely try the tutorials out!