Metroid Style Blaster

How Can I Create A Metroid Style Gun? Example: Press CTRL To Shoot A Single Blast, Hold To Charge. I’m Hardly A Scripter But Here Is A Try: :slight_smile:

var Blast: GameObject ;
var ChargedBlast: GameObject ;
var blastSeconds;1.0;
var chargeSeconds;4.0;
 
function Update () {
   }
}

if (get buttonDown,"Fire1")
blastSeconds, time.deltaTime;
 }
}

if (bet buttonUp,"Fire1")
blastSeconds, time.deltaTime;
  }
}

make.gameObject, Blast;

if (get buttonDown,"Fire1")
chargeSeconds, time.deltaTime;
  }
}

if (get buttonUp,"Fire1")
chargeSeconds, time.deltaTime;
  }
}

make.gameObject, ChargedBlast;

It seems that your attempts at code have degenerated into rendomly combining different pieces of syntax…

Look, you’ve demonstrated over and over that you’re not learning this stuff and probably won’t. If you expect the forum members to repeatedly offer up free solutions to every single almost-daily problem you come across, you’re only detracting from these forums. This is the sort of code that non-coders PAY coders to write - WE WILL NOT WRITE YOUR GAME FOR YOU. Use the free scripts on the Wiki all you want, use the examples - but don’t come here expecting everyone else to write the code you need just because you want it.

If you were learning how to code in the process, it would be a different story. The cycle of help forums goes something like this:

  1. Experienced users help inexperienced users
  2. Inexperienced users learn as they ask questions
  3. Inexperienced users become experienced users
  4. Repeat

Everyone else on this forum progresses through these stages, some at different rates; but I’ve not seen ONE EXAMPLE of you retaining any knowledge the experienced users have graciously bestowed upon you. That’s the sort of thing that kills forums.

DEGENERATED???

I’ve always suck’d.

I’m encouraged to see that you are trying to write some scripts. What I would like to do is guide you toward writing the script for yourself, instead of providing the code for you. That way you will learn the skills to write your own game behaviors without relying on others 100% of the time.

It will take some time and probably be pretty hard. But if you’re willing to try it out, I will help you. What do you say?

This is what I suggest. Scrap Unity all together. Pick up a book on C#, or C, or C++, or Java, or really any language (even Ruby or Python). It doesn’t matter which language you learn, since once you know how to program, syntax from language to language are only minor details. Follow the book, LEARN from it. Then, start making some command line apps. A calculator, an address book, a “Guess the number game”, and maybe once you’ve done that plus a lot more, create a text-based game.

Now, you MIGHT be able to move up to Unity. It might be worth it to learn some OpenGL, and Vector/Matrix/Quaternion math (the math is a must, learning OpenGL along side just gives you an opportunity to apply that knowledge). By this time you should be able to start using Unity.

I’m no longer going to help you with ANYTHING from this point on until I see you learning how to program.

Good luck!

What you were trying to do in your first post, is something that I wouldn"t have a clue on how to do. I’ve been using Unity for over a year and a half, and have even contracted specifically for providing code solutions within unity.

So start smaller. Tell yourself you are going to figure out every question all by yourself, and when you can answer most questions due to having done all the tutorials 3 or so times, and have read every post on the forum like I have( yeah that takes a while) you’ll get treated with more respect. Game development is not the same as playing games. Some parts are, some parts are rocket science.
AC

Well I Would Love To Learn. But I Have Alot Of CRAP In My Life! One Is School.

Luckily for you, you have the rest of your life to figure this all out.

Some things come and go, but for most of us here, Unity is part of an integrated career. It doesnt just go away. See terransages post>it is addictive. hes not kidding. But if your addiction gives you mood swings etc, dont overdo it. moderation is the key…
AC

Exactly the reason why I suggested Ghost take the time to learn now. :o

Someone recently recommended you read this guide:
http://www.unifycommunity.com/wiki/index.php?title=Programming
From the code you’ve posted, I can see that not only have you not read a single page of the guide, but you haven’t even tried to copy other code. You just made up some stuff that you think looks like code in the hope that someone would turn it into a real script.

Ghost, we all have a lot of crap in our lives. Even those of us who get paid to make games with Unity certainly don’t get paid to help you. People on this forum help each other because we like Unity and we want to see other people succeed at trying it out. But you’re not trying. I think I speak for everybody here when I say we’re getting less and less likely to even read your posts until you put some effort in. Even then, nobody here is going to write your game for you.

So do yourself a favour: read the guide. Go through the tutorials. Try things out as you read. Ask questions about specific things you don’t understand after you have read and tried to understand the appropriate documentation. Don’t come here looking for free code without learning to write your own.

Actually I Was Hoping For Some Info On How I Could Make It Better… :expressionless:

" . "

Another little observation, Ghost, if you’ll indulge me…

By your own admission, you aren’t really a big fan of writing code, but you are obviously good at seeing the potential in an idea or an effect and visualising how it would come across in a game. You strike me as more of a concept designer than a scripter. An (extreme) example is Apple’s Steve Jobs. I doubt he knows very much about design or engineering, but he has originated most/all of Apple’s famous products by understanding what works and what doesn’t. It’s probably not a bad line of work to be in. Steve has certainly done OK for himself. Basically, I am saying that you don’t have to be a scripter to be involved with game production.

I can see exactly why you ask the kinds of questions that you do because Unity almost allows you to work like that. It’s a bit like making a model from Lego, which offers some very sophisticated components (motors, pneumatics, etc) that you can just plug in. And it’s not uncommon for programming languages nowadays to offer powerful modules that require little coding skill. Indeed many good “mash-up” websites are simply powerful APIs (Google Maps, Amazon, etc) glued together with off-the-shelf code.

Unity has much better modularity features than even Perl or PHP, but these languages have been established so long that there’s a good chance any code you need will already have been written by an expert somewhere and you just need to find it. Unity may well develop this kind of resource base eventually, but it hasn’t got there just yet.

In short, Ghost, I don’t blame you for having the mash-up philosophy, because that is how a lot of good stuff is achieved nowadays and it’s doubtless what you have grown up with and come to expect from technology. But you’re probably a good year or two ahead of where Unity is currently at. I think you are exactly the kind of person who could help develop the Unity resource base, though. Aim to have a really good, up-to-date knowledge of what is available on the wiki, etc, and base your projects mostly around that. Try to offer a bit of background to your questions, explaining what you have tried and why it didn’t work. And try floating script ideas and game concepts, discussing what kinds of scripts you would like to see, and why. You would probably make better progress and it would be a very useful contribution to the community. (Have a look at the BBC’s Backstage website for a good example of this kind of discussion applied to web technology.)

However, having said all that, if you really want to get into coding then I’m afraid I have to repeat what the others have said. You would need an awful lot of experience to tackle some of the things that you ask for help with. I doubt anybody could learn to write code by struggling with such difficult tasks.

Learn to program. That’s all really. I’d second bronxbomber’s suggestions…just learn to program in any language, and come back to Unity in a few months.

–Eric

Anybody who is coming to the Unite 2007 will get to meet me. I’m alot less annoying in person. Quick Question: If i click on the unity dock icon it does not open. i had to set it to open at login. now the only time it will start up is when i restart my computer. why is this? someone save me!!! Please.