Hi Plasma. There are multiple ways to do this.
Strategy 1: Create a new trigger object objTriggerChangeBg, this will be competely seperate from all the other trigger systems in the game. Set the sprite to sprTriggerMask, set visible to unchecked, and click Add Event -> Collision -> objPlayer. Drag "execute a piece of code" into the actions list. The code will be
background_index = bgIndex;
instance_destroy();
Place the object in the room, right click -> Creation code and assign bgIndex. (bgIndex = bgReallyCoolBackground;)
Strategy 2: Use the existing trigger system. Create an object objEffectChangeBg, with no sprite. Click Add Event -> Step, drag "execute a piece of code" into the actions list. The code will be
if (global.trigger[trg]) {
background_index = bgIndex;
instance_destroy();
}
Place the object in the room, right click -> Creation code and assign trg and bgIndex. (trg = 5; bgIndex = bgReallyCoolBackground;) Also add an objFreeTrigger in your room and assign trg to be matching.