Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - timid_dolphin

#1
I was having issues with my camera continuing to tween when the game was paused, here's a quick fix for this.

With a bit of help from Edmundo, Crimson Wizard and Haloa, I've made this little modification to the Tween module's repeatedly_execute_always function:

Code: ags

function repeatedly_execute_always() {
  // Steps through every active tween
  _i = 0;
  _longestTweenDuration = 0.0;

  for (; _i < Tween_MAX_INSTANCES; _i++) {
    if (!(IsGamePaused() && (_tweens[_i].RefType == _eTweenReferenceCamera 
                           ||_tweens[_i].RefType == _eTweenReferenceObject)))
    {
      if (_tweens[_i].Update()) {
        if(_tweens[_i].IsPlaying()) {
          _CheckIfIsLongestTween(_i);
        }
      }
    }
  }
}

This will pause all camera tweens and object tweens while the game is paused, and resume when the game is unpaused. Works great for me because I have all sorts of GUI tweens going on in my pause menu.

Hope this is helpful to others on here!
#2
Good question!

someone else could correct me here, but I believe the answer is: you can't, at least not without meddling with the module script.

Here's what I'd do:
1 - If you want to automate the cursor in just one room, create an object using the cursor sprite, if you want this in several rooms, make it a character.

2 - Hide the cursor at the same time make the object / character visible at the same screen position as the cursor.

3 - Tween that fake cursor!

Hope this helps.
SMF spam blocked by CleanTalk