Author Topic: [Scripts] Analog Clock With Particles  (Read 770 times)

0 Members and 1 Guest are viewing this topic.

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
[Scripts] Analog Clock With Particles
« on: December 06, 2016, 01:12:53 PM »




Then it loops after 1 second.



This script creates an analog clock on the positive Z face of the script block it is run from.

For anyone curious as to how this works, It first gets the current game time and separates it into the minutes and the hours.

Then it converts the hours and minutes into degrees from 0-360.
Then it converts that to an angle from -180 to 180.

Then it converts that to radians.
Then it converts the radians to a vector.

Then it spawns particles along that vector.


It's not that complicated or hard, It just looks kinda intimidating.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

TheDestinedCrab

  • Legendary Member
  • *****
  • Posts: 1368
  • Did you see that? Me neither.
  • Awards 3 years on site Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site 1 year on site
    • View Profile
    • Awards
Re: Analog Clock With Particles
« Reply #1 on: December 06, 2016, 01:15:44 PM »
Hi Dryym,

That's a really neat script you have! Could I see a small video or even just another picture of the actual clock too?

Cheers,
Crab :)
Thanks Gold Knight for the amazing sig!

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: Analog Clock With Particles
« Reply #2 on: December 06, 2016, 01:18:16 PM »
Hi Dryym,

That's a really neat script you have! Could I see a small video or even just another picture of the actual clock too?

Cheers,
Crab :)

Can't get an actual video of the thing working. You'll either need to try it out, Or come by to see it.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Jeffy

  • Jr. Member
  • **
  • Posts: 74
  • I hate greenbeans
    • View Profile
    • Twitch
    • Awards
  • Xbox: Comrade Creepz
  • Steam: comradecreepzyt
Re: Analog Clock With Particles
« Reply #3 on: December 06, 2016, 04:09:57 PM »
I kinda got this working, the script took me about an hour to make since I don't have a keyboard, the problem I'm facing is that it appears on the script block for a second or two and then disappears, I set the script as power on and power off so it's constantly running, but it still disappears.

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: Analog Clock With Particles
« Reply #4 on: December 06, 2016, 04:43:21 PM »
I kinda got this working, the script took me about an hour to make since I don't have a keyboard, the problem I'm facing is that it appears on the script block for a second or two and then disappears, I set the script as power on and power off so it's constantly running, but it still disappears.

I thought I was clear on this. Put Loop [1000] at the end.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Jeffy

  • Jr. Member
  • **
  • Posts: 74
  • I hate greenbeans
    • View Profile
    • Twitch
    • Awards
  • Xbox: Comrade Creepz
  • Steam: comradecreepzyt
Re: Analog Clock With Particles
« Reply #5 on: December 06, 2016, 08:40:32 PM »
I kinda got this working, the script took me about an hour to make since I don't have a keyboard, the problem I'm facing is that it appears on the script block for a second or two and then disappears, I set the script as power on and power off so it's constantly running, but it still disappears.

I thought I was clear on this. Put Loop [1000] at the end.

Ah, I forgot about the loop but got it working now, thanks.

PWRBTTN

  • Legendary Member
  • *****
  • Posts: 1172
  • Professional Expert, Comrade
  • Awards Awarded to exemplary forum members 2 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: PWRBTTN
  • Steam: PWRBTTN
Re: Analog Clock With Particles
« Reply #6 on: December 06, 2016, 09:48:01 PM »
How accurate it is? Is it accurate enough to be needed to loop every second? Could it be every five or 10 seconds and look just as smooth?
/snail       /snail    /snail         /snail /snail      /snail   /snail                /snail        

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: Analog Clock With Particles
« Reply #7 on: December 06, 2016, 10:51:19 PM »
How accurate it is? Is it accurate enough to be needed to loop every second? Could it be every five or 10 seconds and look just as smooth?

1 second is equal to one game minute. So it would work, But it wouldn't count minutes in game minutes.

And yes, It displays the exact time. I am using the [Clock:] var, So it is always the exact time.


1 second is the best loop for both efficiency, And accuracy. Any faster shows fractions of a minute that don't really matter. Any slower shows minutes incorrectly due to it skipping minutes.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym