Jump to content

Recommended Posts

Posted

I designed my own gun, a rifle but cannot remember the code for letting the player carry it. Should I parent it to the controller or the camera?

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Posted

This is what I have got so far.

 

Local gun:TModel = LoadModel("abstract::gun08.gmf")

EntityParent(fw.Main.camera,gun)

PositionEntity gun,EntityPosition(fw.Main.camera)

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Posted

Thanks. Got it working but its a lousy looking gun.Back to the drawing board.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Posted

Ok I have my gun set up and in position with sound effect and muzzle flash.

I have two problems.

1: The muzzle flash looks good on the gun but produces a sharp round reflection on walls.How can I make it less foccused?

2: I have no idea how to make the gun fire bullets. Any hints would be welcome.

I have studied the lua controller script but can't understand the bullet firing bit.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Posted

1: use a lower range value for the pointlight or

local muzzleflash = CreatePointLight(1)

2: I don't know how to shoot either, but what I would do is stripping down the FPS controller script. Test it out every time you remove a line and see what happens. Thats the approach what I mostly use. Like for example: Do I need values with recoil or do I wan the gun to sway. Ofcourse you can add it back gain later. but for now try to do it without it.

Posted

Thanks I will do that. I won't bother with recoil just keep it simple until I get it working.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...