Skip to main content

Posts

Showing posts from September, 2011

Simple Reload Script

Sooo I'm working on a simple Top Down Shooter game. And This was the script I came up with for the reloading part of the script. Very simple. I think you can use it with any weapon really. You reload with space. You  need to put your own method of Firing in this script. Comment if you have any questions



private var reloading = false;
var reloadTime = 2.0;
private var st : int;

var clipAmmo = 50;
var clipSize = 50;
var stockAmmo = 100;



function Update () {


if (Input.GetKeyDown ("space")){
if(clipAmmo<clipSize && reloading == false && stockAmmo !=0){
SaveTime(Time.time);
reloading = true;
}
}


if(st < Time.time && reloading == true){
Reload();
}

}

//Making it show that you are reloading.
function OnGUI(){

if(reloading == true){
GUI.Box(Rect(250,200,100,25),"Reloading");
}
}


function Reload(){
if(clipAmmo < clipSize){
var neededAmmo = clipSize-clipAmmo;
if(stockAmmo >neededAmmo){
clipAmmo = clipSize;
stockAmmo -= neededAmmo;
}else if(stockAmmo &l…

Top Down Shooter (Object Look At Mouse)

Sooo let's say your making a top down shooter, you want your player to look in the direction of your mouse like so:
(Yeah I know, not the best picture)

Beach Defender

Just uploaded the game I've been working on for the past 2 months on Kongregate. Pretty awesome. I have been working on and off on it for a while and now I can get back to posting on this blog. Play the game here!

GIMP logo tutorial - Applying textures

This tutorial will be one of applying textures in the process of making the logo for game we are about to publish as a webplayer.  I will be using GIMP, a free download art interface.  GIMP is also pressure sensitive if you have a pen tablet, allowing a large range of detail.