• Sleeper Simulant
    2 replies, posted
Hi, for the past 2 days now I've been working on a side project, that being "Sleeper Simulant" from Destiny 1 and 2. I've managed to craft both the view models as well as setup tracers for the bullets. However, due to my inept experience with LUA, I have stumbled across 3 problems that I could use some help with; 1) Bullet/tracer penetration and ricochet: I would like to be able to penetrate multiple targets at once with a single shot, however the bullet stops dead in its tracks when it comes into contact with anything, whether it be an object, player, or npc. As well as ricocheting off of objects while still maintaining its red tracer. 2) Charge time: I am unaware of how to set a charge speed/delay to keep the gun from initially firing instantly, however the consecutive 2 other shots DO have delay. 3) Reload speed: The most simple yet most evasive problem I've faced is setting a slower reload speed from the standard SMG reload. Any and all feedback would be appreciated, assuming you are willing to help that is. (Here is the Sleeper in its current state) https://files.facepunch.com/forum/upload/315192/b9278cc0-f6b2-4673-ad8d-45b0e957bc79/20181020001919_1.jpg
1) use a callback function for the bullet and make it conditionally refire another bullet with the same callback. make sure to keep track of the number of penetrations/ricochets to avoid stack overflow 2) set a nwfloat on initial click for time that it'll be fully charged, then only run the rest of the fire logic if curtime is larger than that 3) setplaybackrate on viewmodel combined with SetNextPrimaryFire
Apologies for asking, but would you mind demonstrating these functions? As I've stated, I am extremely inept at most things LUA as most "code language" is mere jargon to me. However, I would like to lay out what I have so far as to provide more detail into my problems: weapon_railcannon.lua
Sorry, you need to Log In to post a reply to this thread.