Search the Community
Showing results for tags 'Weapons'.
-
Hey, So I have downloaded a couple weapons that are similar in format as to the autopistol that comes with Leadwerks. How would I get them working as such to be able to pick them up during game and swap/add to the FPS player? I tried playing around with some settings but couldn't figure it out. Thanks
-
I am trying to customize a FPS weapon model and find that it's not quite as easy as I thought due to needing to edit the actual original "player weapon" model. In this example, I tried putting my custom "weapon" onto the vwep machete.pfb prefab. It almost works... But as you can see, looks a bit odd with the original weapon sticking out as well. Otherwise, the animation works surprisingly well actually. So I'm hoping someone out there has some similar fbx or blend files that I can use to create custom weapons. I'd also probably want to customize actual gun weapons but I'm working on the melee type for now.
-
After a long while of inactivity on the forums, I wanted to take the time and share my boilerplate and base game application, in c++, for the Leadwerks game engine. The source can be found here. This project uses V$ 2013, C++11 and Leadwerks 3.X. There are currently no external dependencies outside from the full version of Leadwerks Game Engine, on Steam. If you have any problems setting up the application just let me know. I will gladly assist in any way possible. You should be able to clone/download the repo, drag in the Leadwerks asset folders, and be on your way! What it includes: Base Game Object Input Manager State Manager Camera Manager Planned enhancements: Event Management Network integration with Steam Voxel Management Game Object Management Weapons and Bullets Several generic C++ containers much much more The planned enhancements are actually already complete, I am just taking them out from my existing game application, cleaning them up, and adding documentation. I look to push changes to the public-facing repository bi-monthly. I would love to get some feedback about what you guys and gals think, whether you are using it in your projects, and or what you think the template could use. I will be posting notes on my IndieDB blog as well to follow my releases. P.S. The current template contains a simple example, demonstrating the use of the Game Object, Camera Manager, and how to switch between Camera Behaviors.
- 1 reply
-
- 5
-
- Network Programming
- Voxels
-
(and 5 more)
Tagged with:
-
So I have a weapon pick up code (from Piller's youtube video). Now I like it, think it works alright; but I want to know if there is a way to edit it for "if used" but have no clue how that would work. I am not the strongest programmer. Also would it remove the currently equipped weapon? Like "if weapon == true, drop weapon.pickup"(weapon.pick up to drop the currently carried weapon and spawn a pick up identified in the weapons code infront of the player). It may be to much to ask just seeing if it is possible. I have other programming questions but will just try this for now (as it is very important). Thanks all and here is the code that I currently have. Script.vwepfile=""--path "VWep" "Prefab (*pfb):pfb|Prefabs" --Script.vwep=nil--entity function Script:Start() if self.vwepfile~="" then local prefab = Prefab:Load(self.vwepfile) if prefab~=nil then if prefab.script~=nil then self.vwep = prefab.script else prefab:Release() end end end end function Script:Use(player) if self.vwep then if type(player.AddWeapon)=="function" then if player.weapons~=nil then if player.weapons[self.index]==nil then player:AddWeapon(self.vwep) self.entity:Hide() end end end end end function Script:Collision(entity, position, normal, speed) if self.vwep then if entity.script~=nil then self:Use(entity.script) end end end Edit# the build in pick up code works kinda but if you already have a weapon then it wont let me switch to the pick-ed up weapon. So maybe just an edit to that to fix that? Like having an inventory or something?
-
So I have been working for a few weeks on making and fixing up this code, and am at an impasse. I have the weapon equipping and swinging, but nothing is happening to the monsters. I have the code broken into 2 parts, 1 for the swinging and equip, and 1 (attached to a collision entity on the weapons blade) that when it collides with an enemy ai it is supposed to remove health from them. The second code I also plan on tweaking to include everyone who touches it (for traps) but have no clue. The code that isn't working is here. import "Scripts/Objects/Player/FPSWeapon.lua" Script.damage=10 function Script:Start() self.enabled=true end function Script:Collision(entity, position, normal, speed) if self.enabled then self.component:CallOutputs("Collision") end end function Script:Fire() local enemy = self:FindScriptedParent(Collision.entity,"Hurt") if enemy.script.health>0 then enemy.script:Hurt(self.damage,self.player) end --Blood emitter e = self.emitter[2]:Instance() e = tolua.cast(e,"Emitter") e:Show() e:SetLoopMode(false,true) e:SetPosition(pickinfo.position+pickinfo.normal*0.1) e:SetVelocity(0,0,0) end I brought in collision code directly into it so it would know what it was looking for, and imported the script for fps weapon to get the damage system working. It is showing no errors but at the same time doesn't do anything. Any Ideas? I just want to get it working, so I can tweak it for each weapon and trap.