Advertisement
TheUnknownKoala4545

Psych Engine Game Over Modification Script But Now Compatible With All Psych Engine Versions

Jul 25th, 2023 (edited)
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. local deathcharacterName = 'bf-dead' --Character json file for the death animation
  2. local deathSoundName = 'fnf_loss_sfx' --put in mods/sounds/
  3. local deathloopSoundName = 'gameOver' --put in mods/music/
  4. local deathendSoundName = 'gameOverEnd' --put in mods/music/
  5.  
  6. function onCreate()
  7. if stringStartsWith(version, '0.6') or stringStartsWith(version, '0.5') or stringStartsWith(version, '0.4') then
  8. setPropertyFromClass('GameOverSubstate', 'characterName', deathcharacterName);
  9. setPropertyFromClass('GameOverSubstate', 'deathSoundName', deathSoundName);
  10. setPropertyFromClass('GameOverSubstate', 'loopSoundName', deathloopSoundName);
  11. setPropertyFromClass('GameOverSubstate', 'endSoundName', deathendSoundName);
  12. else
  13. setPropertyFromClass('substates.GameOverSubstate', 'characterName', deathcharacterName);
  14. setPropertyFromClass('substates.GameOverSubstate', 'deathSoundName', deathSoundName);
  15. setPropertyFromClass('substates.GameOverSubstate', 'loopSoundName', deathloopSoundName);
  16. setPropertyFromClass('substates.GameOverSubstate', 'endSoundName', deathendSoundName);
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement