// Les actifs du script ont changé pour v2.3.0 Voir // https://help.yoyogames.com/hc/en-us/articles/360005277377 pour plus d’informations // @function get_win_midx(); /// @param {real} _spr_width Sprite Width (use if origin on abs left of sprite) /// @description Return window middle or how much back to put it with the object width function get_win_midx(_spr_width = 0){ return ((window_get_width()/2) - (_spr_width/2)); } // @function center_2width(); /// @param {real} _x1 x pos of largest width /// @param {real} _large_w Width of largest /// @param {real} _small_w Width of smallest /// @description Return how much to push smallest width to center to the largest function center_2width(_x1, _large_w, _small_w){ var _diff = _large_w - _small_w return _x1 + (_diff / 2) }