Search the Community
Showing results for tags 'projectile'.
Found 3 results
Hello, I have a muzzle pivot and the Projectile script attached to it. self.muzzle.script.enabled = true When I call this while clicking the Mouse, the game crashes without warning. I dont know how to use the Projectile script, is it intentionally a prefab ?
I am trying to create a platformer game where you can run, jump and shoot projectiles (lemons like in megaman). I am using 3-D models restricted to a 2-D plane. I already have my character running and jumping, however I am having a very difficult time trying to get shooting. I am not sure how to start. Should I have the chatterer controller script generate the projectiles? Can I make a global trigger that follows the character and emit the bullets? I am not sure where/how to generate the projectiles and where/how to do collision detection. can I have it shot a .pfb that I have made, or will it have to be a basic shape, or sprite? Thanks!
Hi, So I can't find a good example or tutorial on how to create a bullet projectile that will fire in given direction and vanish if get off screen or hit an obstacle. On the forum subject of bullets is mostly covered in FPS type game where you would use a raycasting with no visible bullet. Only post that relates to bullet I'm after is http://www.leadwerks.com/werkspace/topic/11941-bullet-hell/page__hl__bullet but to be honest there is no LUA code to start with and there is no answer actually how to go about it. Did somebody tried to do it ? Please correct me if I'm wrong but it looks like Sprite object will be the most suitable for this. Let's assume for this exercise that I got a 'turret' that fires in one direction if I press a button. On that action a sprite is being created from within a turret script (texture, initial position, etc) and is being pushed with eg. SetVelocity. (other ? please correct) 1. Can Sprite be created from within a turret script and have own LUA script attached which will describe potential interaction with the World like collision, Velocity etc) 2. Will that bullet become own entity in the World ? 3. Can it be destroyed/released/nullified from the World ? If yes, how? 4. Is is possible to determine is Sprite visible by the players camera ? (eg. Top down static view on a playing field I'm am still fairly new to Leadwerks but seems that games with shooting mechanics where Raycasting is not a good option as it requires a projectile to be visible and hit not being instant, are not covered too much. Thanks