eventPPDetachPlayer.js 640 B

1234567891011121314151617181920212223242526272829303132333435
  1. const id = "PM_EVENT_PLATPLUS_DETACH_PLAYER";
  2. const groups = ["Platformer+", "EVENT_GROUP_VARIABLES"];
  3. const name = "Detach Player from Platform";
  4. const fields = [
  5. {
  6. key: "state",
  7. defaultValue: "0",
  8. },
  9. {
  10. key: "field",
  11. defaultValue: "actor_attached",
  12. },
  13. ];
  14. const compile = (input, helpers) => {
  15. const { _addComment, _addNL, _setConstMemInt16, _setMemInt16ToVariable } =
  16. helpers;
  17. _addComment("Set Platformer Plus State");
  18. _setConstMemInt16(input.field, input.state);
  19. _addNL();
  20. };
  21. module.exports = {
  22. id,
  23. name,
  24. groups,
  25. fields,
  26. compile,
  27. allowedBeforeInitFade: true,
  28. };