Page 1 of 1

Document effect names in scriptAPI

Posted: Fri Mar 22, 2019 7:03 am
by NearHuscarl
The only effect name that is documented right now is "CFTXT". There are some other cool effects like "BLD" (blood) or "S_P" (spark) that would benefit modders if documented properly. The old thread about effect names is over a year old

Re: Document effect names in scriptAPI

Posted: Fri Mar 22, 2019 9:46 pm
by JakSparro98
@NearHuscarl
The effects list got slight changes from his previous appearance in the post you mentioned, this is the current list of effects you can use as parameter:
Image
some of the effects need to be handled by using extra parameters (MZLED is one of them).

Re: Document effect names in scriptAPI

Posted: Sat Mar 23, 2019 8:27 pm
by NearHuscarl
I know how to get the effect names. But the devs should themselves document the effects and the params required on some other effects. Some effects I cannot use like "HIT" or "PWT", I assume because of the missing undocumented params.

Here are some of the effects that not working (commented)
https://gist.github.com/NearHuscarl/374 ... 9321fcfa38

Re: Document effect names in scriptAPI

Posted: Sun Mar 31, 2019 5:39 pm
by JakSparro98
NearHuscarl wrote:
Sat Mar 23, 2019 8:27 pm
I know how to get the effect names. But the devs should themselves document the effects and the params required on some other effects. Some effects I cannot use like "HIT" or "PWT", I assume because of the missing undocumented params.

Here are some of the effects that not working (commented)
https://gist.github.com/NearHuscarl/374 ... 9321fcfa38
Refering to the "not working" section from the GitHub link

I assume that PWT is just a sub-part of CFTXT so I don't see why we should use it.

HIT, G_P and PPR_D they simply do not exist (you can notice in the console that HIT is also invoked by some game events, like when a player uses melee against a tile).

TR_SPR is used to spawn a trail of a specified effect, the usage is:
Game.PlayEffect("TR_SPR",Vector2.Zero,<holder>,<effect name>,<duration>);

holder is int
it's the uniqueID of the object the trail needs to track.

effect name is String
it can be any of the effects that does not need extra params (e.g TR_F).

duration is float
if duration is set to 0 it will last until the object linear velocity is 0 for some time, otherwise it will last the given number of seconds or until the object stops moving.

Re: Document effect names in scriptAPI

Posted: Fri Jan 08, 2021 10:56 am
by Juansero29
Is this still undocumented? Seems like a basic thing to have.

Re: Document effect names in scriptAPI

Posted: Fri Nov 04, 2022 4:14 pm
by phantom
Is this possible to set the effect of low hp.

That effect when you are dying your screen fades gray

Re: Document effect names in scriptAPI

Posted: Sat Nov 05, 2022 12:24 am
by Odex64
No, you can't.

Re: Document effect names in scriptAPI

Posted: Mon Nov 07, 2022 2:50 pm
by phantom
Odex64 wrote:
Sat Nov 05, 2022 12:24 am
No, you can't.
It sucks!
I thought that too.