This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk

Forum 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.
Locked
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: 27

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

Locked