Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
[SOLVED] Add the exploding barrel effect
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
-
- Superfighter
- Posts: 97
- Joined: Thu Feb 07, 2019 4:36 am
[SOLVED] Add the exploding barrel effect
Can you add a fifth parameter in IGame.SpawnProjectile() to show the explode effect when the bullet is out of the barrel?
Can you add the exploding barrel effect when bullet is going out of the barrel?
Can you add the exploding barrel effect when bullet is going out of the barrel?
Last edited by NearHuscarl on Tue Mar 10, 2020 4:07 am, edited 2 times in total.
0 x
- Mr Argon
- Fighter
- Posts: 56
- Joined: Sat Mar 09, 2019 2:22 am
- SFD Account: Argón (steam)
- SFD Alias: Mr. Argon
- Started SFD: Pre-Alpha 1.8.2c
- Location: Argentina
- Gender:
- Age: 20
You actually can use Game.PlayEffect() to achieve that. Search the ScriptAPI for effect names and parameters.
1 x
I'м д Liттlэ оdd... sтill саи livе шiтн тнат.
-
- Superfighter
- Posts: 97
- Joined: Thu Feb 07, 2019 4:36 am
I'd looked into EffectNames before I posted this. Unless I missed something, there is no way to do that.
0 x
-
- Superfighter
- Posts: 97
- Joined: Thu Feb 07, 2019 4:36 am
Code: Select all
Game.PlayEffect("MZLED", Vector2.Zero, 0);
0 x
- Mr Argon
- Fighter
- Posts: 56
- Joined: Sat Mar 09, 2019 2:22 am
- SFD Account: Argón (steam)
- SFD Alias: Mr. Argon
- Started SFD: Pre-Alpha 1.8.2c
- Location: Argentina
- Gender:
- Age: 20
Try checking in the script of "Operation Sunrise" un "The Courtyard" part, there are some flak cannons that use this code. Just copypaste an tweak it, it should work that way.
0 x
I'м д Liттlэ оdd... sтill саи livе шiтн тнат.
-
- Superfighter
- Posts: 97
- Joined: Thu Feb 07, 2019 4:36 am
Thank you! I didn't know that, it works perfectly now. Gurt should update the EffectNames btw because I didn't see it
Code: Select all
// Second argument Position is useless
// arg[0] is IObject's Unique ID. the argument will be spawned at IObject.GetWorldPosition()
// arg[1] is the weapon muzzle. So far I found
// "MuzzleFlashAssaultRifle" - AssaultRifle
// "MuzzleFlashL" - M60
// "MuzzleFlashM" - MP50, Pistol, Pistol45
// "MuzzleFlashS" - Cabine, Flare Gun, Grenade Launcher, Magnum, Revolver, Sniper
// "MuzzleFlashBazooka" - Bazooka
// "MuzzleFlashShotgun" - Dark Shotgun, Pump Shotgun
Game.PlayEffect("MZLED", Vector2.Zero, m_tip.UniqueID, "MuzzleFlashAssaultRifle");
0 x