Basically, a script that would play a string if any enemies are present on the screen. It would then play a second string once when all enemies are defeated.
[2.55] boss message strings
Started by
Jenny
, Apr 21 2023 07:36 PM
1 reply to this topic
#1
Posted 21 April 2023 - 07:36 PM
- Twilight Knight likes this
#2
Posted 22 April 2023 - 06:08 AM
I've put everything you need to know in the comments in the script, here you go:
ffc script EnemiesMessages { void run( int entryString, // Friendly greeting string int victoryString, // String to play after slaughtering the innocent enemies int delay, // Increase the delay to have the entryString appear later int noRepeat, // Set to more than 1 to never show the strings again after defeating the enemy int screenVar // Only set this to anything other than 0 if there are conflicting scripts using screen variables ) { if (noRepeat && Screen->D[screenVar]) return; // Enemies spawn after 3 frames // Increase the delay to have the entryString appear later if (!delay) delay = 3; // Need to wait a few frames before enemies have spawned while (delay) { delay--; Waitframe(); } int totalEnemies = Screen->NumNPCs(); // No enemies, return so the messages won't be shown if (!totalEnemies) return; Screen->Message(entryString); // Wait until all enemies have been smashed to pieces while (Screen->NumNPCs()) { Waitframe(); } Screen->Message(victoryString); // Set the screen var so the message won't be shown again (if noRepeat enabled that is) if (noRepeat) { Screen->D[screenVar] = 1; } } }
I could potentially also change it so the entryString plays only once
- Jenny likes this
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users