hogge
New vMember
Posts: 15
|
Post by hogge on May 28, 2024 13:44:48 GMT
Hello, people. I'm working on a very arcadey shooter. I'd like to introduce a suppressor pickup.
It should appear on the muzzle of the pistol upon pickup and change the pistol's sound, the position of the muzzle flash and of course, it should prevent enemies from hearing the shots. The suppressor should have a lifespan limited to a preset number of shots.
How do I access the variables and components necessary to make this happen?
|
|
|
Post by axbaby123 on May 31, 2024 4:49:43 GMT
Lots of ways but sounds to me like that can all be done without modifying Invector components or scripts if you can't figure it out. Trigger Set Active True from False a suppressor pickup Model that is already placed on the gun where you want it but hidden. Hidden = "Set Active False" until your player collides with the suppressor pickup trigger. Set Active True means the suppressor pickup Model is visible. A simple script to say if Mouse clicked keycode "trigger" more then 10 times set active False suppressor and or Set active True what looks like a "damaged" suppressor Model. Next Trigger get rid of Old "Set Active False and Set Active True good suppressor. Sound can be triggered by keycode. if mouse click play this sound.
Another way is to have 2 pistol prefabs with different configurations like gun sound and Muzzle point, one with suppressor and one without. Just some quick silly ideas since no one was responding. 2 muzzle points 1 hidden 1 active. ChatGtp
|
|