Advertisement
Mechalico

Single Switch sort-of tutorial

Mar 21st, 2017
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. Save two copies of this stage. In one, import objs of the play button and button base. Put the button base where the button is but leave the button itself. This one will be what we use for the GMA/TPL files while the other is used for the LZ.
  2.  
  3. Using config files/smb workshop set the rotation as if 0 seconds is when the button is pressed.
  4.  
  5. After compiling the LZ, open it with HxD.
  6.  
  7. Go to the rotating object's collision header. If opened with config (which rn it will be), the first header will be the goal and other objects and each following header will be the models, in order of the model name list at the bottom of the LZ. The offset of the first header is listed in the start and each one is 0x49C bytes long so you can just ctrl-g to it.
  8. In this header write at a further ofset of 0xA4 input 00 01. This will mean that it is affected by switches in group 1.
  9. Then at 0xCC type in 00 00 00 01 which will put the animation in the pause state.
  10.  
  11. Now for the switch.
  12.  
  13. At the end of the LZ type in the switch data:
  14.  
  15. XX XX XX XX <- X coordinate as a bigendian float
  16. YY YY YY YY <- Y coordinate as a bigendian float
  17. ZZ ZZ ZZ ZZ <- Z coordinate as a bigendian float
  18. XX XX <- X rotation, int
  19. YY YY <- Y rotation, int
  20. ZZ ZZ <- Z rotation, int
  21. 00 00 <- Switch type - 00 00 is play in this instance
  22. 00 01 <- Switch group 1
  23. 00 00 <- No known function, probably padding
  24.  
  25. In the main header at 0xA8, input 00 00 00 01, followed by 00 XX XX XX which will be the offset of the switch data.
  26. Then in the first header (which contains the static objects) or in any other static model's header, at a further offset of 0xA8, input the same data as in the main header.
  27.  
  28. This should work, tell me if it doesn't.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement