{
id: "text_controller_fading",
ignore_collide: true,
hidden_in_game: true,
zorder: 50,
properties: {
	set_text: "def(text) [set(self.vars.txt, text), fire_event(self, 'load')]",
	hide: "def() [fire_event(me, 'hide')]",
},
vars: {
	txt: "TEXT",
	size: 2,
},
on_load: "[if(txt, text(txt, font, size)),animation('fadein')]",
on_end_fadein_anim: "animation('normal')",
on_end_normal_anim: "animation('normal')",
on_end_fadeout_anim: "animation('invisible')",
on_end_invisible_anim: "animation('invisible')",
on_enter_invisible_anim: "set(text_alpha,0)",
on_enter_normal_anim: "set(text_alpha,255)",
on_process_fadein: "set(text_alpha, (time_in_animation * 255)/100 )",
on_process_fadeout: "set(text_alpha, ((100-time_in_animation) * 255)/100 )",
on_hide: "animation('fadeout')",
editor_info: {
	category: "controllers",
	var: [
		{
			name: "txt",
			type: "text",
			value: "'TEXT'",
		},
		{
			name: "font",
			type: "text",
			value: "'door_label'",
		},
		{
			name: "size",
			value: 2,
		},
	],
},
animation: [
	{
		image: "effects/particles.png",
		x: 148,
		y: 197,
		w: 28,
		h: 28,
		frames: 1,
		id: "fadein",
		duration: 100,
	},
	{
		image: "effects/particles.png",
		x: 148,
		y: 197,
		w: 28,
		h: 28,
		frames: 1,
		id: "fadeout",
		duration: 100,
	},
	{
		image: "effects/particles.png",
		x: 148,
		y: 197,
		w: 28,
		h: 28,
		frames: 1,
		id: "normal",
		duration: 100,
	},
	{
		image: "effects/particles.png",
		x: 148,
		y: 197,
		w: 28,
		h: 28,
		frames: 1,
		id: "invisible",
		duration: 100,
	},
],
}
