hii broken sword style cursor my tutorial

Started by katie08cd, Fri 20/04/2018 10:13:37

Previous topic - Next topic

katie08cd

hi my name is Katie,
since last week I'm using AGS to create my own game and I've done some tutorials that maybe can be interesting

https://youtu.be/rq_cOq_t2Oo

BROKEN SWORD STYLE CURSOR

create room,create view,create objects,create hotspot for objects, hotspot for change room
your animation hand


on hotspot object set> mouse over hotspot





function hnext0_MouseMove()
{
if (mouse.IsModeEnabled(eModeLookat)) {
  oHandx.Visible = true;
  object[0].SetView(6);
  object[0].Animate(0, 5);
  object[0].StopAnimating();
  oHandx.Visible = false;
  }
}

Crimson Wizard

Hello.

I may recommend using GUI with animated button instead of objects for this. Objects are restricted for the room, which means that in every room you would have to create another object for this hand. GUI, on other ... hand (:)) are not tied to the particular room.

Another thing, you are playing blocking animation that would pause the game for a moment, which may become unwanted (annoying player).
My suggestion is instead to do this:
- start non-blocking animation when mouse enters the area, and run the timer;
- in repeatedly_execute check for the timer, and when it runs out, hide the object.
This way your game does not get paused while the hand is on screen, and player can still move cursor freely.


katie08cd

hi thanks, the hand is only put in the rooms where he says he can go on, for the code that you say what should I change?
I did not know then that in the GUI I can put animated objects :)

function hnext0_MouseMove()
{
if (mouse.IsModeEnabled(eModeLookat)) {
  oHandx.Visible = true;
  object[0].SetView(6);
  object[0].Animate(0, 5);
  object[0].StopAnimating();
  oHandx.Visible = false;
  }
}

SMF spam blocked by CleanTalk