Hello how can i stop these windows from going off screen? I mean Item stara window, they have diffrent size dependent from Item rarity.
You can use clamp for that. Assuming the origin of that window is top left.
X = clamp(self.x, 0, viewportWidth-self.width)
Y = clamp(self.y, 0, viewportHeight-self.height)
Develop games in your browser. Powerful, performant & highly capable.
I dont know if i good understand u, but i create this object on my item:
You can change those formals slightly to use there or just do it in a set position action after the crest action. All the clamp is doing is move the box so that it fits on screen.