@Fintrik
Wow, thanks a lot!! <3
But why does it not appear in the trigger editor?? The map is unusable now as it shows error upon changing anything and saving it. Is there a way to fix this? Or I should make a new map and start all over?
I'm not sure why it doesn't appear (It's likely another bug in the Reforged World Editor) but the file responsible for that should be war3map.wtg which holds all the information for GUI to display individual triggers, conditions, actions etc in the Trigger Editor. The information stored here however is non-human readable and will require a good bit of trial and error + experimenting to figure out.
If your project is relative small I'd recommend to do as you suggested and start over/import everything into a new map. However, another thing you could do is to make sure that while the trigger exists, it does nothing and see if that works.
Here's my JASS trigger I made as an example, let's pretend it's invisible in this example:
Besides that I have another trigger which is GUI:
We'll use these two triggers to see what's going on with the map
So upon extracting war3map.wtg we should see this in the Notepad:
First thing we notice is that for the GUI trigger it stores information for each individual event/condition/action and it's parameters, there's also some structure to it, however we can't understand it from a simple glance.
Another thing we notice is the lack of any information stored for our JASS trigger other than the name.
With this information we can assume that deleting actions in the GUI trigger might cause issues (Deleting the trigger from war3map.j corrupts the map, saving the map uses the information from war3map.wtg and overwrites it + Testing the map from the World Editor throws me into the menu without playing the map) and there shouldn't be any issues tinkering with the inner workings of the JASS trigger.
Next we extract and take a look at war3map.j and scroll down to our JASS trigger:
Here we can see some functions but the most interesting for us will be 'InitTrig_mytrig'
This function sets up the trigger and makes sure that it is created, has events, conditions and actions to execute
So let's comment all of that like so:
NOTE: Make sure no trigger is attempting to run this trigger through Run Trigger action!
Before:
After: