Author Topic: [Scripts] Blinking script  (Read 899 times)

0 Members and 1 Guest are viewing this topic.

Platinum Dryym

  • Supreme Member
  • *****
  • Posts: 4162
  • 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+300 posts 3 years on site+600 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
[Scripts] Blinking script
« on: November 09, 2016, 12:52:19 PM »



This is a super simple script that can be applied to just about any survival type map.

It would be especially good in a horror type map.



All it does is blink your virtual eyes. To make this script work, All you need to do is write out that script, And then make a looping script which calls on it each time it loops.

Alternatively, You could just replace the exit with a loop and reset the vars, But then you can't do things to the player when they blink.


If anyone is wondering, The reason I have 8 HUD Shapes is to create a blur at the bottom of my simulated eyelid.

Edit:

Spoiler for Hidden Content:
var [S] [H]
If
  IsVar [S] [=] [1]
  IsVar [H] [=] [0]
Then
  Exit
Elseif
  IsVar [S] [=] [1]
Then
  var [H] = [H] - [360]
Elseif
  IsVar [H] [<] [720]
Then
  var [H] = [H] + [360]
Else
  var [S] = [1]
Endif
HUDShape [EyeBlink1] [player] [rect] [0,0,1280,H2] [0,0,0,150] [abs]
var [H2] = [H] * [1.15]
HUDShape [EyeBlink2] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink3] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink4] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink5] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink6] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink7] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink8] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
Loop
« Last Edit: November 10, 2016, 07:59:35 AM by Count Dryymula »

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

Jesse

  • Extreme Member
  • *****
  • Posts: 6216
  • Oldest Lasting TM Youtuber.
  • Awards Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar Former MotM winners Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site+600 posts 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • YouTube: BOBsCAST
    • Awards
  • Xbox: YT Mysterio
  • PSN: YT_Mysterio
  • Steam: YT Mysterio
Re: Blinking script
« Reply #1 on: November 09, 2016, 04:27:21 PM »
Nice script Dryym this could be beneficial in another way then what you listed maybe a challenge way. :) ;) I got a idea with this. But can you retake the first pic as it was kinda shakey at top.


/mm Thanks Gold Knight for sig /mm
/mm MotM September '14 /mm
/mm Robo February '15 /mm
/mm 4th Demi Gods December '16 /mm
/mm Youtube: BOBsCAST /mm

Lunar

  • Elite Member
  • *****
  • Posts: 878
  • The God of the Galaxy
  • Awards 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
Re: Blinking script
« Reply #2 on: November 09, 2016, 08:25:04 PM »
Can you record a video of it so we can see it?

Platinum Dryym

  • Supreme Member
  • *****
  • Posts: 4162
  • 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+300 posts 3 years on site+600 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
Re: Blinking script
« Reply #3 on: November 09, 2016, 10:53:07 PM »
Can you record a video of it so we can see it?

No. But seeing as the script isn't difficult to replicate, It should either be easy for you to make it yourself, Or for someone who can make a video to write the script and make a video on it.


Also, The obscured line at the top just declares the S and H vars.

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

PWRBTTN

  • Legendary Member
  • *****
  • Posts: 1148
  • Professional Expert, Comrade
  • Awards Awarded to exemplary forum members 2 years on site+300 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: PWRBTTN
  • Steam: PWRBTTN
Re: Blinking script
« Reply #4 on: November 10, 2016, 07:07:06 AM »
I'm not putting this in the structure of scripts the way you'd see them in the script menu. I'm writing them as you'd have them if you wanted to copy/paste them in xbox smartglass.



var [S] [H]
If
IsVar [S] [=] [1]
IsVar [H] [=] [0]
Then
Exit
Elseif
IsVar [S] [=] [1]
Then
var [H] = [H] - [360]
Elseif
IsVar [H] [<] [720]
Then
var [H] = [H] + [360]
Else
var [S] = [1]
Endif
HUDShape [EyeBlink1] [player] [rect] [0,0,1280,H2] [0,0,0,150] [abs]
var [H2] = [H] * [1.15]
HUDShape [EyeBlink2] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink3] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink4] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink5] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink6] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink7] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink8] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
Loop


If you're on mobile, turn your phone to landscape mode. It'll let you see where the lines end smoothly.
« Last Edit: November 10, 2016, 07:55:50 AM by PWR »
/snail       /snail    /snail         /snail /snail      /snail   /snail                /snail         

Platinum Dryym

  • Supreme Member
  • *****
  • Posts: 4162
  • 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+300 posts 3 years on site+600 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
Re: Blinking script
« Reply #5 on: November 10, 2016, 07:58:02 AM »
I'm not putting this in the structure of scripts the way you'd see them in the script menu. I'm writing them as you'd have them if you wanted to copy/paste them in xbox smartglass.



var [S] [H]
If
IsVar [S] [=] [1]
IsVar [H] [=] [0]
Then
Exit
Elseif
IsVar [S] [=] [1]
Then
var [H] = [H] - [360]
Elseif
IsVar [H] [<] [720]
Then
var [H] = [H] + [360]
Else
var [S] = [1]
Endif
HUDShape [EyeBlink1] [player] [rect] [0,0,1280,H2] [0,0,0,150] [abs]
var [H2] = [H] * [1.15]
HUDShape [EyeBlink2] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink3] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink4] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink5] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink6] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink7] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink8] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
Loop

Ignore the 's. The site did dumb BBCode stuff to the post without them. If you are manually typing the code in, just omit the 's. If you're using smartglass to copy/paste, you can liter just paste it in. The script menu will remove them for you.

Also, if you're on mobile, turn your phone to landscape mode. It'll let you see where the lines end smoothly.


Fixed. I will add this to the OP.

It's quicker for me to take pictures than to type the entire thing out again. So thanks.

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

Jesse

  • Extreme Member
  • *****
  • Posts: 6216
  • Oldest Lasting TM Youtuber.
  • Awards Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar Former MotM winners Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site+600 posts 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • YouTube: BOBsCAST
    • Awards
  • Xbox: YT Mysterio
  • PSN: YT_Mysterio
  • Steam: YT Mysterio
Re: Blinking script
« Reply #6 on: November 10, 2016, 04:28:51 PM »
Spoiler for Hidden Content:
I'm not putting this in the structure of scripts the way you'd see them in the script menu. I'm writing them as you'd have them if you wanted to copy/paste them in xbox smartglass.



var [S] [H]
If
IsVar [S] [=] [1]
IsVar [H] [=] [0]
Then
Exit
Elseif
IsVar [S] [=] [1]
Then
var [H] = [H] - [360]
Elseif
IsVar [H] [<] [720]
Then
var [H] = [H] + [360]
Else
var [S] = [1]
Endif
HUDShape [EyeBlink1] [player] [rect] [0,0,1280,H2] [0,0,0,150] [abs]
var [H2] = [H] * [1.15]
HUDShape [EyeBlink2] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink3] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink4] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink5] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink6] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink7] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
var [H2] = [H2] * [1.15]
HUDShape [EyeBlink8] [player] [rect] [0,0,1280,H2] [0,0,0,48] [abs]
Loop


If you're on mobile, turn your phone to landscape mode. It'll let you see where the lines end smoothly.
Thanks if I remember I will help with a vid. But I should be able to remember.


/mm Thanks Gold Knight for sig /mm
/mm MotM September '14 /mm
/mm Robo February '15 /mm
/mm 4th Demi Gods December '16 /mm
/mm Youtube: BOBsCAST /mm

crazytater94

  • Supreme Member
  • *****
  • Posts: 2556
  • Mastering TM since 2011
  • Awards Awarded to exemplary forum members Members who have unlocked the robotic avatar 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Former MotM winners Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: crazytater94
  • PSN: crazytater94 (Inactive)
  • Steam: crazytater94
Re: Blinking script
« Reply #7 on: May 01, 2017, 02:02:23 AM »
I decided to put this in my script list just for fun, and I noticed when I save it, it says that the xywh for the first HUD shape, does not exist.

I've tried adding H2 as a called var in line 1, which makes a static black box on the screen, and if I copy the h2=h2*1.15 right before the HUD, it blinks only once.

Am I missing something? I have it letter for letter like typed above

crazytater94

  • Supreme Member
  • *****
  • Posts: 2556
  • Mastering TM since 2011
  • Awards Awarded to exemplary forum members Members who have unlocked the robotic avatar 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Former MotM winners Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: crazytater94
  • PSN: crazytater94 (Inactive)
  • Steam: crazytater94
Re: Blinking script
« Reply #8 on: May 01, 2017, 02:16:13 AM »
Found it.

In the first HUD shape line, you have H2, and it should be H