<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Stamina Depletion]]></title><description><![CDATA[<p dir="auto">Im currently trying to develop a stamina UI, problem is, sometimes it doesnt match the player stamina. For example, if you sprint, jump and repeat these like 4 times you would ran out of stamina even though the bar would not even be at half. Any ideas on whats happening or how the stamina regen or spending works?</p>
]]></description><link>https://forum.plutonium.pw/topic/39055/stamina-depletion</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 18:15:20 GMT</lastBuildDate><atom:link href="https://forum.plutonium.pw/topic/39055.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Dec 2024 15:28:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Stamina Depletion on Sat, 24 May 2025 22:33:52 GMT]]></title><description><![CDATA[<p dir="auto">In the end, did you do the whole script or are you still doing it?</p>
]]></description><link>https://forum.plutonium.pw/post/158360</link><guid isPermaLink="true">https://forum.plutonium.pw/post/158360</guid><dc:creator><![CDATA[DiegoSwap]]></dc:creator><pubDate>Sat, 24 May 2025 22:33:52 GMT</pubDate></item><item><title><![CDATA[Reply to Stamina Depletion on Mon, 19 May 2025 18:34:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/diegoswap" aria-label="Profile: DiegoSwap"><bdi>DiegoSwap</bdi></a> that's just a snippet of code that would go into a gsc file that you would put in your storage/t6/scripts/zm folder.</p>
<p dir="auto">it's missing a few parts to actually draw the hud, that was just the "math" calculation part i was sharing for dergyrt who was looking for a formula that could display sprint / stamina values.</p>
]]></description><link>https://forum.plutonium.pw/post/158121</link><guid isPermaLink="true">https://forum.plutonium.pw/post/158121</guid><dc:creator><![CDATA[DirkRockface]]></dc:creator><pubDate>Mon, 19 May 2025 18:34:58 GMT</pubDate></item><item><title><![CDATA[Reply to Stamina Depletion on Sat, 17 May 2025 14:47:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dirkrockface" aria-label="Profile: DirkRockface"><bdi>DirkRockface</bdi></a> And where should I put that code?</p>
]]></description><link>https://forum.plutonium.pw/post/158064</link><guid isPermaLink="true">https://forum.plutonium.pw/post/158064</guid><dc:creator><![CDATA[DiegoSwap]]></dc:creator><pubDate>Sat, 17 May 2025 14:47:32 GMT</pubDate></item><item><title><![CDATA[Reply to Stamina Depletion on Thu, 19 Dec 2024 19:59:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dergyrt" aria-label="Profile: dergyrt"><bdi>dergyrt</bdi></a> you don't think so what?</p>
<p dir="auto">This works great for me with very little deviation from what i find is the actual sprint.  it's a bar graph for me (you can implement it however you like)</p>
<p dir="auto">Edit: oh i see, you are saying it doesn't match up for you... got it.  yeah i've found it to be 90% accurate which in the absence of anything else / official, works great for my use. Let me know if you get something closer <img src="https://forum.plutonium.pw/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=820c8bfc6a0" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.plutonium.pw/post/150765</link><guid isPermaLink="true">https://forum.plutonium.pw/post/150765</guid><dc:creator><![CDATA[DirkRockface]]></dc:creator><pubDate>Thu, 19 Dec 2024 19:59:04 GMT</pubDate></item><item><title><![CDATA[Reply to Stamina Depletion on Thu, 19 Dec 2024 18:33:43 GMT]]></title><description><![CDATA[<p dir="auto">dont think so, that has the same problem, here is my implementation of your formula with a textbox (to verify accuracy):</p>
<pre><code>updateStamina()
{
    self endon("disconnect");

    if(self hasPerk("specialty_longersprint"))
    {
        self.maxsprintcount = 7.0;
    }
    else
    {
        self.maxsprintcount = 3.5;
    }
    
    self.sprintcount = self.maxsprintcount;
    
    for(;;)
    {
        if(self isSprinting() &amp;&amp; self.sprintcount &gt; 0)
        {
            self.sprintcount = self.sprintcount - 0.1;
        }
        else if(self.sprintcount &lt; 0.5)
        {
            self.sprintcount = self.sprintcount + 0.05;
        }
        else if(self.sprintcount &lt; self.maxsprintcount)
        {
            self.sprintcount = self.sprintcount + 0.1;
        }
        
        self.sprintcount = max(0, min(self.sprintcount, self.maxsprintcount));
        
        staminaPercentage = int((self.sprintcount / self.maxsprintcount) * 100);
        
        if(isDefined(self.staminaText))
        {
            self.staminaText setText("Stamina: " + staminaPercentage + "%");
            
            if(staminaPercentage &lt;= 25)
            {
                self.staminaText.color = (200, 0, 0);
            }
            else
            {
                self.staminaText.color = (0, 200, 0);
            }
        }
        
        wait 0.05;
    }
}
</code></pre>
]]></description><link>https://forum.plutonium.pw/post/150764</link><guid isPermaLink="true">https://forum.plutonium.pw/post/150764</guid><dc:creator><![CDATA[dergyrt]]></dc:creator><pubDate>Thu, 19 Dec 2024 18:33:43 GMT</pubDate></item><item><title><![CDATA[Reply to Stamina Depletion on Thu, 19 Dec 2024 18:07:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dergyrt" aria-label="Profile: dergyrt"><bdi>dergyrt</bdi></a><br />
I gave this a go and ran into the same issue you did.<br />
After probably 15 different iterations, this was the formula i used that best matched up for my sprint status bar!</p>
<pre><code>if(self hasperk("specialty_longersprint"))
{
    self.maxsprintcount = 7.0;
}
else{
    self.maxsprintcount = 3.5;
}
if(self issprinting() &amp;&amp; self.sprintcount &gt; 0)
{
    self.sprintcount = self.sprintcount - .1;
    wait .05;
}
else if(self.sprintcount &lt; .5)
{
    self.sprintcount = self.sprintcount + .05;
    wait .05;
}
else if(self.sprintcount &lt; self.maxsprintcount)
{
    self.sprintcount = self.sprintcount + .1;
    wait .05;
}

self.sprint_bar updatebar(self.sprintcount / self.maxsprintcount);
</code></pre>
]]></description><link>https://forum.plutonium.pw/post/150763</link><guid isPermaLink="true">https://forum.plutonium.pw/post/150763</guid><dc:creator><![CDATA[DirkRockface]]></dc:creator><pubDate>Thu, 19 Dec 2024 18:07:44 GMT</pubDate></item></channel></rss>