kiljoy96kiljoy96

Main News Movies Games Audio Favorites Reviews Stats 1 Fan
Add to Favorites
kiljoy96
Age / Gender:
73, Male
Location:
Pizza Planet
Joined:
7/2/08
All Stats >

I should probably go to sleep now.

User Statshot

Community Stats
Level 21 Musician
Normal Whistle
Ranked as Police Officer

Contact Info / Websites

Latest News

I got bored.

1/30/12 by kiljoy96

So I made a simple program in VB (I'm making pointless projects so I don't forget the language for next year's classes) that simulates a car starting and stopping.

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Timer1.Enabled = False Then
Timer1.Enabled = True
ElseIf Timer1.Enabled = True Then
Timer1.Enabled = False
End If
If Timer2.Enabled = False Then
Timer2.Enabled = True
Timer3.Enabled = False
ElseIf Timer2.Enabled = True Then
Timer2.Enabled = False
Timer3.Enabled = True
End If
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Label1.Text < 40 Then
Label1.Text = Label1.Text + 1
End If
If Label1.Text >= 40 Then
If Label1.Text < 50 Then
Label1.Text = Label1.Text + 0.8
ElseIf Label1.Text >= 50 Then
If Label1.Text < 60 Then
Label1.Text = Label1.Text + 0.6
ElseIf Label1.Text >= 60 Then
If Label1.Text < 70 Then
Label1.Text = Label1.Text + 0.4
ElseIf Label1.Text >= 70 Then
If Label1.Text < 75 Then
Label1.Text = Label1.Text + 0.2
ElseIf Label1.Text >= 75 Then
If Label1.Text < 80 Then
Label1.Text = Label1.Text + 0.1
ElseIf Label1.Text >= 80 Then
Label1.Text = Label1.Text + 0.01
End If
End If
End If
End If
End If
End If
End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
PictureBox1.Top = PictureBox1.Top - Label1.Text / 4
If PictureBox1.Top < -80 Then
PictureBox1.Top = 630
End If
End Sub

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click

End Sub

Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
If Label1.Text > 0 Then
Label1.Text = Label1.Text - 2
Else
Label1.Text = 0
End If
If Label1.Text = 0 Then
Timer3.Enabled = False
End If
If PictureBox1.Top < -80 Then
PictureBox1.Top = 630
End If
PictureBox1.Top = PictureBox1.Top - Label1.Text / 4
End Sub
End Class

Basically, it just increases the number of a label acting as a speedometer, which the timers then borrow from, divide the number by four, and subtract from the y value of the picture box to make it go, simulating a steady speed growth and exponential distance coverage. You just basically do the same thing inversed to make it stop smoothly.


Recent Game Medals

Being generous! 5 Points Give John some money. Go to game.
COAL 5 Points Find coal. Go to game.
IRON 5 Points Find iron. Go to game.
Start off your adventure! 5 Points Enter Utopia. Go to game.
No Fatty Pop 25 Points 04 - Survive after being inflated by Dig Dug Go to game.
Bad Call 5 Points 02 - Choose any incorrect option with Annie the Mermaid Go to game.
Fooled You 25 Points 01 - Knock boss off conveyer belt Go to game.
Kong Punt 25 Points 01 - Punt Donkey Kong Jr. Go to game.
SECRET MEDAL 10 Points Unlock this medal to see it's details. Go to game.
SECRET MEDAL 25 Points Unlock this medal to see it's details. Go to game.


Total Medals Earned: 588 (From 91 different games.)

Latest Audio Submissions

EPIC Comedy Voice
Just....Slow Down Classical Song
ThisOnesForNewgrounds Drum N Bass Song
Some Trippy Shit Miscellaneous Loop