header general

Sparks FX

  • Salahmander
  • Salahmander's Avatar Topic Author
  • Cacodemon
  • Cacodemon
More
10 years 1 month ago #1 by Salahmander
Sparks FX was created by Salahmander
Anyone know how to work them? I tried what it said on the document but to no avail it didn't work.

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
10 years 1 month ago #2 by Blue Shadow
Replied by Blue Shadow on topic Sparks FX
How are you using it? What arguments are you passing to the spark thing?

Please Log in or Create an account to join the conversation.

  • Salahmander
  • Salahmander's Avatar Topic Author
  • Cacodemon
  • Cacodemon
More
10 years 1 month ago #3 by Salahmander
Replied by Salahmander on topic Sparks FX
Downward facing, the thing is near the ceiling, 4 in the second argument, and 0 in the third.

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
10 years 1 month ago #4 by Blue Shadow
Replied by Blue Shadow on topic Sparks FX

Salahmander wrote: 4 in the second argument

That's the problem. The documentation says that the second argument's value is divided by 16. So having 4 as the argument's value nets us 0.25 (4 / 16 = 0.25). The engine truncates the decimal part after division, so you'll end up with just 0. This zero is passed to A_Jump as the jump chance. A jump chance of zero means no jump at all, and thus no sparks spawn.

If you want the sparks to have a chance to spawn, the minimum value you should pass is 16 as the second argument, since it will result in 1 for the jump chance.

Please Log in or Create an account to join the conversation.

  • Salahmander
  • Salahmander's Avatar Topic Author
  • Cacodemon
  • Cacodemon
More
10 years 1 month ago #5 by Salahmander
Replied by Salahmander on topic Sparks FX
Ah that's where I went wrong, thanks very much Blue Shadow. (Y)

Please Log in or Create an account to join the conversation.