954,190 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

help with a project(tomagatchi clone)

hey i wanted to start a tomagatchi clone project with vb..
im having problems with it...
cann't get it so that as time pass( every 1 minute) that the hunger,boredom, and need to poop increase
i tried to use the timer but i cant get it down...
an example would help a lot!:mrgreen:
oh yea im using vb express and im just learning vb as school and wanted to try to program somthing cool with vb.
thx

lazysloth
Newbie Poster
3 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
 

Let's see ya code please.

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

go easy on me :) i just started and don't really know what im doin :)
Public Class Form1
Dim play As Integer = lblplay.Text
Dim fullness As Integer = lblfullness.Text
Dim potty As Integer = lblfullness.Text

Private Sub btnfeed_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnfeed.Click


If fullness > 90 Then
MsgBox("Im full!!!")
Else
fullness = fullness + 10
End If

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click


If play < 90 Then
play = play + 10
ElseIf play > 90 Then
MsgBox("I dont want to play anymore!")
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

If potty < 90 Then
potty = potty + 10
ElseIf potty > 90 Then
MsgBox("I don't need to take a crap anymore!")
End If
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Enabled = True
Timer1.Interval = 1000
Dim play As Integer
Dim potty As Integer
Dim fullness As Integer
neglect(play, potty, fullness)
End Sub
Public Function neglect(ByVal hun As Integer, ByVal pla As Integer, ByVal pott As Integer)

Return hun = hun - 1
Return pla = pla - 1
Return pott = pott - 1

End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


End Sub
End Class

lazysloth
Newbie Poster
3 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
 

Have u checked out this tutorial?

http://abstractvb.com/code.asp?A=1032

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

thx:)

lazysloth
Newbie Poster
3 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You