|
-
May 19th, 2000, 11:42 PM
#1
Thread Starter
Fanatic Member
hi,
i used this code
Private Sub Command1_Click()
Dim Num1%, Num2%
Randomize Timer
Num1 = Int((6 * Rnd) + 1)
Num2 = Int((6 * Rnd) + 1)
Image2.Picture = LoadPicture("C:\My Documents\vb\Total Domination\dice\dice " & Num1 & ".jpg")
Image3.Picture = LoadPicture("C:\My Documents\vb\Total Domination\dice\dice " & Num2 & ".jpg")
End Sub
to create the random dice
but now i need something that adds up the dice and displays the answer in a label, i am leading this to once the label has the number it has to move an object to set of co-ordinated, that coincide with the number on the dice
PLEASE HELP ME !!!
Thanks
Merlin ?
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
May 20th, 2000, 12:10 AM
#2
transcendental analytic
I'm not sure what you meant, something like this?
Code:
label1=num1+num2
object.move num1,num2
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 20th, 2000, 12:21 AM
#3
Thread Starter
Fanatic Member
thanks
hi,
the label bit worked
but the object move thing didn't but that doesn't matter as
i want to move the piece to specific co-ordinates
any suggestions
(p.s. this might help you, i am designing a board game,
hence all of the dice and moving questions)
Cheers
Merlin ?
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
May 20th, 2000, 03:24 AM
#4
transcendental analytic
Well what object are you moving? What coordinates are you using?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 20th, 2000, 03:31 AM
#5
Thread Starter
Fanatic Member
hi,
i'm using an image to move
and the co-ordinates are those on the page
so if the dice came up 6 then i would find where the sixth
place is and write the co-ordinates are
x1,x2,y1,y2
can you help ?
Merlin ?
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
May 20th, 2000, 06:44 AM
#6
transcendental analytic
What about the other coordinates? Do you have them systematically aranged by an algoritm, using an array, or just want to have a select case to do that? I would recommend an algoritm, but you should tell how your board game looks like
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 20th, 2000, 04:53 PM
#7
Thread Starter
Fanatic Member
the board is a square and you go aaround the outside of it,
do you think that i could use the move commnad ?
if so do you have any suggestions ?
Merlin ?
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
May 20th, 2000, 05:30 PM
#8
transcendental analytic
Of course you have to use move command, if youi woudnt prefer to change left and top property separately. Now you still makes it hard for me get anything understood the problem when you're not explaining enough. I have to give you an example instead and see if you like it.
Code:
image1.move 64+num1*32,64+num2*32
Put this after your code, change image1 to you imagebox name, run it and tell me if it's that you wanted
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 20th, 2000, 05:42 PM
#9
Thread Starter
Fanatic Member
it sort of works
would it help if i emailed you my project so far ?
Merlin ?
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
May 20th, 2000, 06:00 PM
#10
transcendental analytic
If everything works fine, then you don't need to, but if you want me to have a look at it, it's ok. I could give you some good advice on what to do next
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|