Hello Everyone I'm Here because i need some help. i made all the parts of my game but i cant make the shoot part can anyone help me?
PS: I'm Using Delphix(It's old but it still work)
Hello Everyone I'm Here because i need some help. i made all the parts of my game but i cant make the shoot part can anyone help me?
PS: I'm Using Delphix(It's old but it still work)
Hi and welcome to PGD!
You'll have to give us a bit more information about what exactly you need to know. First it would help to know what kind of game you are making. And second, what are you "shooting" with and at? Also do keep in mind that we can help you with the math and maybe some of the physics, but it'll ultimately be up to do the coding yourself. It's not hard, but it does take the effort to learn. But first we need more details in order to offer our advice.
Also, you my find that game and graphics libraries have come a long long way since DelphiX was the big thing. If you didn't know there are lots of alternatives, just have a look around the site and you'll be able to read about them.
Well, I'm Making a game like the old Berzerk for Atari. I Make all part from player movimentation to Enemy AI but i can't make the shoot My friend send me this code:
But when i try it , somehow give acess violationCode:If isbutton1 in Form1.DXInput1.States then begin With TTiro.Create(Form1.DXSpriteEngine1.Engine) do begin Tiro.Image:= Form1.DXImageList1.Items.Find('tiro'); Tiro.X:= Nave.X; Tiro.Y:= Nave.Y; Tiro.Height:= Tiro.Image.Height; Tiro.Width:= Tiro.Image.Width; end; end;
Last edited by WILL; 14-10-2010 at 04:31 PM. Reason: placed your code into a code block
First of all... please use [ code ] tags in your posts. Makes it more readable.
Second. Try this:
I think this should solve your Access violation problemCode:If isbutton1 in Form1.DXInput1.States then begin With TTiro.Create(Form1.DXSpriteEngine1.Engine) do begin Image:= Form1.DXImageList1.Items.Find('tiro'); X:= Nave.X; Y:= Nave.Y; Height:= Image.Height; Width:= Image.Width; end; end;
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
Where did you create Tiro object? If it isn't created it will give access violation at that point. If you need that variable you can do this also:
Code:If isbutton1 in Form1.DXInput1.States then begin tiro := TTiro.Create(Form1.DXSpriteEngine1.Engine); With tiro do begin Image:= Form1.DXImageList1.Items.Find('tiro'); ...
Bookmarks