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.

[SOLVED] Add ejecting case effect.

Give us your input on how we may improve the ScriptAPI in the game in future versions.
Forum rules
By using the forum you agree to the following rules.
Post Reply
NearHuscarl
Superfighter
Superfighter
Posts: 97
Joined: Thu Feb 07, 2019 4:36 am

[SOLVED] Add ejecting case effect.

Post by NearHuscarl » Wed Mar 11, 2020 5:30 am

EDIT: Here is the solution

Code: Select all

// shell IDs: "ShellBig" "ShellSmall" "ShellShotgun" "ShellGLauncher"
// created shells will be automatically removed after a while
IGame.CreateObject("ShellBig");
I'd like to have a way to spawn a case when the gun recoils. Currently the API to do that is not exposed.

Image
Last edited by NearHuscarl on Sat Mar 21, 2020 5:45 pm, edited 1 time in total.
0 x
Image

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Mon Mar 16, 2020 7:15 pm

Bullet shells are handled like any normal object for spawning, but they aren't documented in any place, for knowing the name of most of the editor entities you can press the AltGr key while hovering the mouse on the entity.
0 x

NearHuscarl
Superfighter
Superfighter
Posts: 97
Joined: Thu Feb 07, 2019 4:36 am

Post by NearHuscarl » Mon Mar 16, 2020 8:31 pm

Thanks for the hint. The AltGr trick didn't work for me but I decompiled the game and get the ShellID from the weapon. It works perfectly now
0 x
Image

Post Reply