Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Dragoon

Skill Tree System: Stopping A Script

Question

#library "SKILLS"
#include "zcommon.acs"

Script 599 ENTER //This changes the TID of all players to 1666.
{
    Thing_ChangeTID(0, 1666);
}

Script 600 (void) //This adds a 10% increase to the Player's speed.
{
    if (CheckInventory("SP") > 0)
    {
        TakeInventory("SP", 1);
        SetActorProperty(1666, APROP_SPEED, 1.10);
        HudMessage(s: "Your SPEED increased!";
            0, 1, CR_YELLOW, 905, 605, 0.5);
    }
    else
    {
        HudMessage(s: "You do not have enough Skill Points!";
            0, 1, CR_RED, 905, 605, 0.5);
    }
    Delay(1);
}

Hi everyone! I have this first passive skill, which increases the player's speed each time it is upgraded. 

I was wondering if there is a way to check the player's speed (set to a sort of capacity limit), and stop the script from trying to add more speed increase to the player with a notification saying "You are already fast enough!".

 

How will I go about doing this? I would not want the player to get to 1000 times speed. 

Share this post


Link to post

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×