Modifying Guns.
This will be a tutorial on modifying guns. And turn it into anything , literally anything.(Except for walls and stuff , etc.)
It may be abit wordy but I will make it as understandable as possible.
To modify guns , you would need guns(obviously) , triggers and timers.You might also need regions , pushers , decorations and doors.You can also use doors to replace timers if you know how to do it.
(Since I am not an expert in timers and stuff I mostly use doors as a replacement.)
So start off with a gun.Gun fire-rate depends on what gun you select , though you can change the gun's fire-rate but why bother when there is a simple way out.
Note : From here onwards please read carefully!
Next , there is 2 options :
Option 1. Start with a timer(A) and a trigger(A).Timer-A targets trigger-A , delay is up to you though.30 delay : 1Second.
Option 2. Start with Region(A) and a trigger (A). Region-A activates trigger-A. How it activates is up to you.
Now here is the part where you have to decide what you want your gun to do when it fires OR how you want it to work.
--------------
Modding gun projectiles , fire-rate ,ETC.
Changing projectiles :
This part is fairly easy.The triggers have a action that directly changes the projectiles.(Listed as under "guns" category)
Bullets : No need to explain.
Rails : Guns shoot out rails.
Energy : BNG projectiles.
Rocket : Shoots out rocket.
Grenade : Shoots out the projectile of grenade launcher , NOT the grenade itself.
(Defibillator...It shoots out 0 projectiles so I are not sure if there is projectile or not.I mean , it may shoot out bandages that only travels at a distance of 0.01mm)
Depending on the projectile , it may weaken/strengthen the gun's power.For example if I make a CS-Rifle shoot out rails , the damage it does would slightly decrease. So you might need to change the gun's projectile's power.This does not reset the gun's amount of projectile to "1".
Gun's power/damage :
This part can be easy , yet tricky.The triggers have a action that changes the power of the projectiles.(Listed as under "guns" category)
Default power depends on the gun itself.
Higher power = higher impact , higher piece-rate , higher recoil and higher push-back effect done to player-initator.
However , setting it to negative wont do damage . at all.Projectiles would appear but they wont do damage.However they still does recoil and push-back effect though.Just that the push-back effect is reversed so if I shoot the gun at my target I would go closer to the target instead of further.
The gun's push-back power also depends on the amount of projectiles it sprays. So if I set to it spraying 5 projectiles with power of 2 , it would be push back the player about (5x0.5) times more than it use to , this is the estimated caculations though , not fully accurate.
Again , this does not reset the gun's amount of projectile to "1".
Gun's amount of projectile.
Easiest part.The triggers have a action that changes the amount of the projectiles that the gun fires.(Listed as under "guns" category)
Just changes the amount of projectiles that the gun fires.
You can set it to negative so that the gun would still fire but projectiles wouldn't appear.(Well they would , but they can appear anywhere on the map for a split second.)
---------------
Tool Guns.
If you read all the " modding guns part " , please remember that you still have your trigger-A and now we are going to add few more triggers.
Depending on what you want to make , I will just simply teach you how to make a warp gun.(Teleports to player-initator cursor) And hopefully you come up with your own stupid yet crazy ideas of your own gun.
Make a trigger(B).Now trigger-A will have a action of " Activiate trigger-B when gun-A fires ".
If you want the gun to be able to shoot even when teleporting , then thats done.If not , change the amount of projectiles it fires to 0.
Now your done with that trigger-A.But please don't dumb it away.
Now there is 2 way to do it.But I will teach you the way so that everyone can use that gun.
Make region(B) and region(C) , make region-B about the same size characters and region-C 10x-10y long. Now make trigger-B do these 2 actions
FIRST , make sure its the first 2 action that it does or it will not work!!!! :
- " Move region-B to player-initator "
- " Move region-C to player initator cursor "
Now , let it do this action :
- " Teleport all players from region-B to region-C ".
And there you go , it should teleport the player to the cursor though.If it doesn't work , check everything again , make sure your triggers , region and stuff are working properly.
I have made a portal gun at this map ID : jdeck-test
It is opened-source too so you can check that out.
------------
Tips :
- If you notice the trigger can do up to 10 action , however they do NOT do it exactly the same time.So for example the 1st action it does it
harm Region-A and then the 2nd action teleports the guy to Region-A , the guy would NOT take damage.But if it was swapped around then the guy would take damage.
Hence? It looks like all the actions have the same timing but it is actually not.Use this to your advantage.
- You can make buttons/timers that makes the same gun do different actions instead of 1 action over and over again.
- When A.I bots shoots at a target , their cursor is always aimed at a target literally all the time.Though you can change that fact using some trigger actions and regions.
Well if you want to learn how to make some special guns then I recommend you to check this one out :
viewtopic.php?f=126&t=14839