Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Sat 01/06/2019 09:25:38

Title: SOLVED: Draw hole mouse x y
Post by: Slasher on Sat 01/06/2019 09:25:38
Hi,

I have a room where the player can use a certain inventory item anywhere.

When you use the inventory item you walk to that spot (mouse x y) via a hotspot. On arriving a short animation plays and a hole appears.

What I would like to do is,  from a drawn hole sprite, draw it and repeat this for every destination walked without have to place duplicate sprite holes which could run into dozens!

All answers appreciated.

Thanks


EDIT  Found the answer.

Code (ags) Select

  DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
  surface.DrawImage(oSpade.X, oSpade.Y, oHole.Graphic, 0);
  surface.Release();