<?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[Help pls pls]]></title><description><![CDATA[<p dir="auto">Please tell me how to make something happen something every second, two seconds or three</p>
]]></description><link>https://forum.liquidbounce.net/topic/1831/help-pls-pls</link><generator>RSS for Node</generator><lastBuildDate>Sat, 09 May 2026 14:10:13 GMT</lastBuildDate><atom:link href="https://forum.liquidbounce.net/topic/1831.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 06 Apr 2021 14:27:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Help pls pls on Sat, 10 Apr 2021 13:36:52 GMT]]></title><description><![CDATA[<p dir="auto">@cancernameu Thank you very much, helped a lot</p>
]]></description><link>https://forum.liquidbounce.net/post/14324</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14324</guid><dc:creator><![CDATA[Its Domme]]></dc:creator><pubDate>Sat, 10 Apr 2021 13:36:52 GMT</pubDate></item><item><title><![CDATA[Reply to Help pls pls on Wed, 07 Apr 2021 00:52:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/its-domme" aria-label="Profile: its-domme">@<bdi>its-domme</bdi></a></p>
<pre><code>this.onUpdate = function() {
    if(mc.thePlayer.ticksExisted % (1*20) == 0)
        do_stuff();
}
</code></pre>
<p dir="auto">To give some context here, <code>mc.thePlayer.ticksExisted</code> is the amount of ticks (20 ticks = one second), <code>x % y</code> is a modulo operation, it takes the residue of x divided by y. <code>== 0</code> checks if the modulo operation returns zero, i.e. x is divisible by y.</p>
<p dir="auto">So, since onUpdate runs every tick:<br />
Ticks = 1: false<br />
Ticks = 2: false<br />
Ticks  = 3: false<br />
...<br />
Ticks = 20: true<br />
The if statement now runs every time the amount of ticks the player has existed is divisible by 20, every second.</p>
]]></description><link>https://forum.liquidbounce.net/post/13926</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/13926</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Wed, 07 Apr 2021 00:52:22 GMT</pubDate></item></channel></rss>