Jump to content
THIS IS THE TEST SITE OF EUROBRICKS!
THIS IS THE TEST SITE OF EUROBRICKS!

Cheatay

Eurobricks Vassals
  • Joined

  • Last visited

  1. nicotornare started following Cheatay
  2. thank you so much Cosmik42, freestorm and Lok24 Tanks to you, I was able to start the tests on my layout not yet finished. I plan to run several trains but I have to buy sensors and hubs. A video to show an example of sound integration in the layout :
  3. Yeah ! It works ! I think I use it to animate train traffic: make a hissing sound when approaching a bridge, whistle the wharf leader when the train arrives at the station and start the announcement at the microphone of train departure ect ... Thanks again for the help :)
  4. hi again I tested at the moment and still no result :( The global code: public static string [] sound = { "siflement1", }; public const int bell = 1; public const string path = "C: \\ Users \\ Rebecca \\ Downloads \\ Lego Train Project \\"; // ---- play ---------------------------- // static void play (int so) { System.Media.SoundPlayer player = new System.Media.SoundPlayer (); string fn = path + sound [so] + ". wav"; player.SoundLocation = fn; player.Play (); } The compil is ok but when I execute the command "play (bell);", I have the following error: "FATAL ERROR In Program: The index is outside the bounds of the table."
  5. Thanks again :) but it does not work. I checked the names and directories: everything looks ok. What I have in the global code: // The code in this section will be available in all other programs! // ////////////////////////////////////////////////// ///////////////////// // Create your own enums public enum MyEnum { MyYellowTrain = 0, MyRedTrain = 1 } // Create your own helper functions public void MyGlobalFunction () { // Execute your code here public static string [] sound = {// Filenames "Xxx" "Siflement1", // <----- 1 ------ change this to a filename on your disk without the .wav "sound2", // <------ 2 ----- change this into a filename on your disk without the .wav }; public const int bell = 1; // <---------- changes "bell" to the name you want to start the sound or leave it as "bell" public const int hupe = 2; // <---------- changes "hupe" into the name of "hupe" public const string path = "C: \\ Users \\ Denis \\ Downloads \\ Lego \\ Layout \\"; // <----- 3 ----- change this to the path of the sounds on the disk, note the double \\ // ---- play ---------------------------- // <------ leave the rest as it is static void play (int so) { System.Media.SoundPlayer player = new System.Media.SoundPlayer (); string fn = path + sound [so] + ". waw"; player.SoundLocation = fn; player.Play (); } } // Create your own constants! public const int RED_TRAIN = 1; public const int YELLOW_TRAIN = 2; and error messages: Compiling code ... Compiling failed. Error (CS1513):} expected Error (CS1518): Class, delegate, enum, interface, or expected struct Error (CS1518): Class, delegate, enum, interface, or expected struct Error (CS1518): Class, delegate, enum, interface, or expected struct Error (CS1518): Class, delegate, enum, interface, or expected struct Error (CS1001): The expected identifier Error (CS0116): A namespace can not directly contain members such as fields or methods Error (CS1022): Definition of type or namespace, or expected end of file
  6. Thank you Lok24, but I do not know anything about programming and I do not know how to modify the code :(
  7. Hello Cosmik42 First, congratulations on your great job and sharing ! Do you think to integrate the function to play an mp3 file to your program ? Like the whistle of a train before leaving the station for example ? Regards, Cheatay
  8. I don't understand why Bricklink causes errors. I added the file stud.io in dropbox which is accepted by bricklink. I changed the color of the snowmobile that did not exist in orange by yellow ;) https://www.dropbox.com/sh/rlkhq72m5lbvbxd/AADXphjUWmdT_d7S1Ku4VEcua?dl=0
  9. Cheatay replied to enigma84's post in a topic in LEGO Star Wars
    Like this ? Look this topic : https://www.brickpirate.net/forum/phpBB3/viewtopic.php?f=60&t=21848 I mixed the old and new together with a few more pieces :)
  10. Hello, Here is my diorama winter village : And a video among the best blockbusters :
  11. Thanks. This may indeed be too contrasted but test to see the result. As long as you like the end result.
  12. Thanks, For those interested, here are the links for LDD files : Snow Resort Ski Lift : https://www.dropbox.com/sh/c81pz1n8csxavwi/AADj8nuqcJgJrsrX9dia_YoWa?dl=0 Snow Resort Chalet : https://www.dropbox.com/sh/rlkhq72m5lbvbxd/AADXphjUWmdT_d7S1Ku4VEcua?dl=0 Chocolate Van : https://www.dropbox.com/sh/o48jpxj4gcp1795/AABO1GTVPhaQVGvt-Au8Y375a?dl=0
  13. Chocolate Van by Cheatay, sur Flickr Chocolate Van 2 by Cheatay, sur Flickr I am at the origin of the snow resort ski lift "winter village" and I did the same for the cottage. And as you've seen, I've also transformed the chocolate van Snow Resort Chalet10 by Cheatay, sur Flickr
  14. Gray Squadron Pilot
Sponsored Links