Results 1 to 5 of 5

Thread: Visual Cooldown Notification?

  1. #1

    Visual Cooldown Notification?

    I've added binwait to several force powers in my mod for 'cooldown' periods. It is a bit annoying to not know exactly when the power can be used again. Having SetInvActivated as 1 until the cooldown is over would do well, but I've no idea how to implement that.

    SetInvActivated is the verb used for triggering the force power icon at the top right, isn't it?

  2. #2

  3. #3
    Excellent. Now, I'm experienced with the cog language, but I'm no scripter. The only way I figure I can keep the inventory active (without breaking the power) is by checking if the wait time (SetBinWait) is greater than 0. How would I do that though. Surely "if(SetBinWait(player, 33, 35.0) > 0)" is improper syntax.

  4. #4
    The docs suggest that SetBinWait is used while the inventory bin is inactive and that it won't work when it is. Someone should test this.

    The alternative is to set up a cooldown timer and flag in the cog and ignore activations while the flag is true.
    And when the moment is right, I'm gonna fly a kite.

  5. #5
    A few years ago when I was messing with the Destruction cog. I used SetBinWait for the first time and the Icon remained for the wait duration. I don't have that cog anymore but this is one section of it I still have:

    Code:
    activated:
    
        rank = GetInv(player, 33);
        mana = GetInv(player, 14);
    
           if(!IsInvActivated(player, 33))
           {
               if((mana >= 120) && (GetInv(player, 13) >= 80)) && (GetThingHealth(player) >= 25))
               {
                if(charge == -1)
                {
                    if(GetInv(player, 64) != 1) ChangeInv(player, 13, -cost) && ChangeInv(player, 14, -120);
                    SetBinWait(player, 33, GetSoundLen(destChrgSound));
                    SetTimerEx(0.001, 0, 0, 0);
                }
            }
        }
        else
        {
            if(charge == 3)
            {
                call stop_power;
                PlaySoundThing(destFireSound, player, 1.0, -1, -1, 0x80);
                 SendTrigger(-1, 333, player, rank, 0, 0);
                AddDynamicTint(player, 20.0, 0.0, 0.0);
                PlayKey(player, destFireAnim, 1, 0x38);
                SetBinWait(player, 33, 30.0);
                charge = -1;
            }
        }
    
       Return;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •