Jump to content

Photo

Screen Script, Enemies and Music Changer if Item ID

Screen Changer

  • Please log in to reply
21 replies to this topic

#16 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 26 December 2019 - 10:43 AM

Ah, so writing Screen->Enemies[] works on screen init now? IIRC, it did not in the past, and you were forced to reload the screen.

I wouldn't see why it wouldn't work. And even if it didn't, then you could use the new pattern for NO_SPAWNING, which would stop all enemy spawning until you edit the pattern, allowing you to edit the enemies and then set the spawn pattern.



#17 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 26 December 2019 - 11:19 AM

Enemy replacement on screen init runs excellent.
Just the midi "leap frog switch" (Start chosen midi and back to DMap Midi after 1 frame)restart is "not so fancy".

I tried a lot around with that script.
(while I have not a real Idea, what I'm doing)
I made it a ffc script (then it had not that jump back to DMap Midi, when it's set to "run at screen init") but it also restarts each following screen (with same script)

I added a "waitframe line"
(thought maybe it's fixing the quick change back to DMap midi)
Compiling worked but it didn't change anything to these functions.
I used the ffc script npcMIDI to set the screen music to "peaceful music" for the peaceful state (as long as Wooden Sword), but same result.
New start of screen Midi, each screen

#18 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 26 December 2019 - 11:37 AM

My originaly Idea was to make a Group formaly peaceful screens, become as dangerous as the rest of Hyrule.

So I wanted the script replace enemies (what works absolutely fantastic) change/bypass the screen data midi, to "use DMap MIDI" for these screens, just like the rest of the map.

But if this isn't possible, it's not a big problem to me.
Of course, it would be amazing if there is a way, to make the script doing exactly what I wished for.

But the current script is already genius 💚💚💚

#19 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 26 December 2019 - 11:58 AM

So, it's restarting the MIDI on every screen? That's.... an interesting issue. Might be fixable, but might not; I'll need to check it out when I'm less tired.


  • Bagu likes this

#20 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 26 December 2019 - 12:29 PM

Alright.
I'm glad you will help me.

Thank you

#21 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 27 December 2019 - 11:21 AM

Of course it changes the midi on other screens. PlayMIDI() ends if you change screens, and was designed for boss rooms. Use DMapMIDI[] to change it for the entire DMap.


  • Bagu likes this

#22 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 27 December 2019 - 12:58 PM

Yeah, that was my first conclusion.
I have a lot to learn about the functions and the usage of different script types.

I found my personal solution now.
i use the first version "ChangeEnemie".


I use it oppositual.
I let it check for the wooden sword,
To replace screen enemies with none or easier enemies.
I use Script "Enemy Music" to check screen enemies.
It's playing the combat background music "near battle", from TP.
If all enemies are dead, original peaceful screen Music restarts.

I also added the "ChangeEnemies" as a ffc script, gonna try if it's possible to use more than one per screen (without causing errors), if all relevant Items (only swords in this case) are replaced and their former levels are completely removed from inventory data.
One intressting thing.
If you replace a empty enemy slot, it's replaced with the right ID, but spawns the max number of enemies.

Edited by Bagu, 27 December 2019 - 01:01 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users