Page 1 of 1

[SOLVED] Add ejecting case effect.

Posted: Wed Mar 11, 2020 5:30 am
by NearHuscarl
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

Re: Add ejecting case effect.

Posted: Mon Mar 16, 2020 7:15 pm
by JakSparro98
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.

Re: Add ejecting case effect.

Posted: Mon Mar 16, 2020 8:31 pm
by NearHuscarl
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