cassius Posted March 29, 2010 Share Posted March 29, 2010 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? Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 29, 2010 Share Posted March 29, 2010 The fps controller script uses this: vwep:SetParent(fw.main.camera,0) Quote Link to comment Share on other sites More sharing options...
cassius Posted March 29, 2010 Author Share Posted March 29, 2010 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) Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 29, 2010 Share Posted March 29, 2010 The wiki says this: BlitzMax: EntityParent:Int( entity:TEntity, parent:TEntity, global:Int = 1 ) I think you need to switch the main camera with the gun. Quote Link to comment Share on other sites More sharing options...
cassius Posted March 30, 2010 Author Share Posted March 30, 2010 Thanks. Got it working but its a lousy looking gun.Back to the drawing board. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
cassius Posted March 31, 2010 Author Share Posted March 31, 2010 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. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 31, 2010 Share Posted March 31, 2010 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. Quote Link to comment Share on other sites More sharing options...
cassius Posted March 31, 2010 Author Share Posted March 31, 2010 Thanks I will do that. I won't bother with recoil just keep it simple until I get it working. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Recommended Posts
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.