Page 1 of 7

UrbanTerror - 2D

PostPosted: Wed Dec 08, 2010 8:13 pm
by Lacotemale
Might as well tell everyone what im doing... in case anybody didn't know im trying to create a 2D version of one of my favourite games of all time.

Urban Terror!

If you wish to help me take a look at the issues and see can you solve anything. You will get a +1 for your help! :)

You can also get a +1 for any contributions to improve the game.

Issues:
    Enemy not animated yet.

    Issues below now fixed in 0.8 release.

    Fixed - Walking animation still not in the game
    Fixed - No enemy AI done - need help on this
    Fixed - First level not completely finished
    Fixed - Objectives system not done

Download link: http://ubuntuone.com/3gxz4G3irFiUrgdnpzIFBl

Yeah so recently I got quite sick and there wasn't much to do, so I came back working on this for a period of a few weeks. :D The majority of effort went into animating the main character and providing an enemy to fight. Also knifes thrown will have gravity and stick into the ground. Guns will have the slide kicking back, dropping empty shells and empty clips on reload. The first level has now been finished for the most part and the game has an objective system. The filesize of the project has grown to 37.7 Mb at the moment, so I have just provided the files to test the game.

Image

Image

Note: The sounds are not under a distributable license and not included in the above download. However there is an executable with sound included.

ChangeLog:

0.8.0
    Additions:
    Reloading will drop the empty clip
    Now has a knife enemy you can kill
    Levels can have background objects
    Throwing knifes have gravity
    A used throwing knife will now stick in the ground
    New shooting animations for crouch + standing
    Shooting guns will drop used shells
    Objective system/items
    Player has jumping animations
    Player has walking animations
    Player can now get killed from enemies or falling below ground
    Finished the first level content
    Added chat dialogs
    Added level complete functionality

    Sound:
    Added atmosphere sound
    Added fountain noise

    Bug fixes:
    Physical response fixed for player/enemy collision.

    Misc:
    Cleanup old unused graphics from data folder

Contributors:
    I would like to thank the following people for their help:

    Imperialjester - Code
    Schnellboot - Code
    Friedfish - Smoke graphic


The gravity and jumping is thanks to Tutochao's tutorials... dude your tutorials rock!!

Re: Shooting - How is it done?

PostPosted: Wed Dec 08, 2010 8:18 pm
by schnellboot
put in create actor

Re: Shooting - How is it done?

PostPosted: Wed Dec 08, 2010 8:32 pm
by Lacotemale
It says:
Undeclared identifier cursor


How can I sort this?

Re: Shooting - How is it done?

PostPosted: Wed Dec 08, 2010 8:41 pm
by lcl
Lacotemale wrote:It says:
Undeclared identifier cursor


How can I sort this?

In that code cursor is the name of the actor that shows where you're aiming.
So, just place your cursor actor's name to where reads cursor. :D

Hope you understood. :D

Re: Shooting - How is it done?

PostPosted: Wed Dec 08, 2010 8:52 pm
by Lacotemale
Thanks but my code seems to do nothing. :oops:

This code is for left mouse click with Player actor.

Code: Select all
CreateActor("Bullet", "bullet", "(none)", "(none)", 0, 0, false);

angle = direction(x,y, aimer.x, aimer.y);

directional_velocity = 10;


This is my first game so Im pretty useless with GE so far. :D

Re: Shooting - How is it done?

PostPosted: Wed Dec 08, 2010 9:14 pm
by lcl
Let me tell you what that your code would do. :D
If you click player, it would set players angle to aimer and directional_velocity to 10.

So, you have to put create actor part of the code to aimer's mouse button down and rest of it
to Bullets create actor code. :D

Note that if aimer is just something like that in the screenshots, it is not very easily clickable. So, create filled region actor, move it on the aimer, set its parent to be aimer and add the mouse button down code (the one that creates the bullet) to it. Now it cathes the mouse instead of aimer itself. :D

Re: Shooting - How is it done?

PostPosted: Wed Dec 08, 2010 9:37 pm
by Lacotemale
Thanks very much!! :D

However the bullets come from the mouse pointer... but I just want the bullets to come from the Player in the direction of the mouse pointer.

I hope you understand! :)

Re: Shooting - How is it done?

PostPosted: Wed Dec 08, 2010 9:47 pm
by schnellboot
I tell you the method of makslane:
You create filled region and scale it to fill the view
then you click right on the region -> new activation event and assign it to player
then in player -> actor control -> activation event -> createactor -> bullet
then in bullet -> actor control -> createactor -> script editor -> the code
it should work

Re: Shooting - How is it done?

PostPosted: Thu Dec 09, 2010 1:34 pm
by lcl
The way I told you, you have to create the bullet to players position, and the CreateActor command should be this:
Code: Select all
CreateActor("Bullet", "bullet", "(none)", "(none)", Player.x, Player.y, false);

:D

Re: Shooting - How is it done?

PostPosted: Thu Dec 09, 2010 8:07 pm
by Lacotemale
Where should this command go inside?

CreateActor("Bullet", "bullet", "(none)", "(none)", Player.x, Player.y, false);


Inside:

Player?

or

Aimer (mouse)?
:?

Re: Shooting - How is it done?

PostPosted: Thu Dec 09, 2010 8:16 pm
by schnellboot
inside your filled region
as mentioned you have to create one

Re: Shooting - How is it done?

PostPosted: Thu Dec 09, 2010 10:27 pm
by lllllvenomlllll
go to the top were is ses help go to making of go to space invaders watch that it will tell u how to creat a bullet and for how u wanting to shoot with cursor is proly not the way u want to do it u can but its more complicated

Re: Shooting - How is it done?

PostPosted: Fri Dec 10, 2010 4:27 pm
by lllllvenomlllll
HEY IF U NEED ANY HELP WITH CODE ILL HELP U WORK ON UR PROJECT I HAVE NONTHING ELSE IM WORKING ON MYNASWELL TEACH SOMONE AND HELP THEM BUILD A PROJECT TOGHETHER. LET ME KNOW.

Re: Shooting - How is it done?

PostPosted: Sat Dec 11, 2010 3:03 pm
by Lacotemale
Caps lock stuck? :D :wink:

I don't mind if people want to help me... as its basically only a personal project to make my own game. If ye are wondering about the graphics... I made them myself and thats why they are so bad! :D

The main thing I want to sort is the shooting. I want the bullets to come from the player or even better from the gun! :)

Below is my .ged and my bad graphics included! :oops:

Re: Shooting - How is it done?

PostPosted: Sat Dec 11, 2010 3:37 pm
by schnellboot
There you go.
If you like +1 wouldn't be bad ^^