Karma: +0/-0
Posts: 2
Offline
|
 |
« on: August 26, 2008, 04:59:35 AM » |
|
Hi All,
I am still learning to get to grips with C#. I am working in Visual Studio 2008 which is making following and locating peices of code fairly easy, but I am still a long way off being competant!
I did manage to change the target.png and stad_2.png using instructions from this site, and from there worked out where to change the number of targets and background colour.
Now for my question...
Ok, I know you can change the target.png for another image by saving the new image under this file name in the WiiDesktopVR folder, but how could I insert another image into the Desktop VR program without just saving it under the target.png file name in the WiiDesktopVR folder?
Also... Is there a way to put two different images in the DesktopVR program, for example having both a reg target and a yellow target?
I hope this doesn't turn out to be a really silly question for you all!
Thanks,
JB
|
|
|
|
|
Logged
|
|
|
|
Support Admin
Karma: +11/-3
Posts: 567
Offline
|
 |
« Reply #1 on: August 26, 2008, 07:34:28 AM » |
|
Easy - search in the code for target.png - replace that with the text of your liking...
And the 2nd part...
You need an array of images of some sort and then you have to populate your targets with this array of images
|
|
|
|
|
Logged
|
|
|
|
Karma: +0/-1
Posts: 22
Offline
|
 |
« Reply #2 on: August 27, 2008, 03:30:26 AM » |
|
And the 2nd part...
You need an array of images of some sort and then you have to populate your targets with this array of images
I'm sorry but this sounds confusing to me. I have been asking the same questions as JamesB78 and wondering how to have multiple different targets on screen at once also.
Could someone please tell me how in a silly-proof way OR could someone just do there own and upload the code?
Thanks beautiful people.
|
|
|
|
|
Logged
|
|
|
|
Support Admin
Karma: +11/-3
Posts: 567
Offline
|
 |
« Reply #3 on: August 27, 2008, 06:43:20 AM » |
|
I cannot show you the code as I don't have it but the concept is something like this
create an array with images 1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg
start a loop create a target and assign an image you choose (1.jpg is the 1st position in array) move to the next position in the array
this feature is repeated for all targets
another way(better) is to use a random feature
start a loop create a target and assign an image from the array but you use random to calculate witch image to use every time
If you aren't used to programming I can understand that it is hard to understand...
//UndCon
|
|
|
|
|
Logged
|
|
|
|
Karma: +0/-1
Posts: 22
Offline
|
 |
« Reply #4 on: August 27, 2008, 09:32:08 PM » |
|
Thanks UndCon.
I get the 'make jpeg's in numerical order' part. Its the 'make a loop' code that eludes me. Thanks. I do love this stuff!
|
|
|
|
|
Logged
|
|
|
|
Support Admin
Karma: +11/-3
Posts: 567
Offline
|
 |
« Reply #5 on: August 28, 2008, 01:51:30 AM » |
|
here is a simple for-loop
for (int i = 0; i <= targets; ++i) { code to assign the target image here
myImageArray.Next(); }
what this do(should do) is:
assign i =0 (used as a counter in this case and we set it to 0) as long as i is less or equal to targets - increase i with 1 (i++)
(target is the same variable in the program that tells how many targets to show, I have this adjustable by keypress)
when the code of getting an image and using it as target (drawing target) is done you move to the next target-image with myImageArray.Next();
here you will need something that warns/ignores or tell you when your array of images are out, If you try to move to the next image and there is none you will get error/crash
|
|
|
|
|
Logged
|
|
|
|
Karma: +0/-0
Posts: 13
Offline
|
 |
« Reply #6 on: September 03, 2008, 11:57:44 AM » |
|
where do i put the image and loop?? in what carpet?
|
|
|
|
|
Logged
|
|
|
|
Karma: +0/-0
Posts: 83
Offline
|
 |
« Reply #7 on: October 01, 2008, 10:11:06 PM » |
|
i think shld put in the showTarget method
|
|
|
|
|
Logged
|
|
|
|
|