eventPPSetState.js 914 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. const id = "PM_EVENT_SET_PP_STATE";
  2. const groups = ["Platformer+", "Player Fields"];
  3. const name = "Set Platformer+ State";
  4. const fields = [
  5. {
  6. key: "state",
  7. label: "Select Player State to Set (this feature is still experimental)",
  8. type: "select",
  9. defaultValue: "0",
  10. options: [
  11. ["0", "Falling"],
  12. ["3", "Grounded"],
  13. ["6", "Jumping"],
  14. ["9", "Dashing"],
  15. ["12", "On a Ladder"],
  16. ["15", "On a Wall"],
  17. ["18", "Knockback"],
  18. ["20", "Blank"],
  19. ],
  20. },
  21. {
  22. key: "field",
  23. defaultValue: "que_state",
  24. },
  25. ];
  26. const compile = (input, helpers) => {
  27. const { _addComment, _addNL, _setConstMemInt16, _setMemInt16ToVariable } =
  28. helpers;
  29. _addComment("Set Platformer Plus State");
  30. _setConstMemInt16(input.field, input.state);
  31. _addNL();
  32. };
  33. module.exports = {
  34. id,
  35. name,
  36. groups,
  37. fields,
  38. compile,
  39. allowedBeforeInitFade: true,
  40. };