TheMajinZenki Posted August 31, 2006 Share Posted August 31, 2006 Hi there. I'm not good at all with scripting and stuff... so I'm asking you guys to know if it's even possible. I'd like to do a script for horses (or at least one specific horse) that when you mount him, the script will play a specific "riding horse" music. I searched the files, but I couldn't find anything similar.. so I guess I'll have to make my own one, but I don't know how. Thanks for your help... :) ~TheMajinZenki Link to comment Share on other sites More sharing options...
GBHis Posted August 31, 2006 Share Posted August 31, 2006 Making the music play is easy. Detecting when the player demounts is somewhat tricky, though. Link to comment Share on other sites More sharing options...
Abramul Posted August 31, 2006 Share Posted August 31, 2006 I believe you have to hit the 'use' key to dismuont. Does this target the horse? If so, an OnActivate (or whatever, I think that's the function) should work, as long as you have a variable that keeps track of whether it's a mount or dismount. Link to comment Share on other sites More sharing options...
GBHis Posted August 31, 2006 Share Posted August 31, 2006 I'm testing something similar for a mod called "Flying Chairs". Wait a little, and I'll reply with my conclusion :) Link to comment Share on other sites More sharing options...
TheMajinZenki Posted August 31, 2006 Author Share Posted August 31, 2006 I tried writing this script: scn HorseMusic begin OnActivate StreamMusic "data\music\special\Trombe!.mp3"end I save and try, but when I place a horse modified with that script (player.placeatme hexcode), it says that I haven't compiled the script or something similar... but I did save the script, I'm sure. edit:Ok, I tried modifying an existing script (in this case, Cheydinhal owned horse script, "HorsePCBlackCheydinhalScript"), and I changed near the end to something like this:[...] Set TellPC to 0 Activate EvaluatePackage StreamMusic PublicEnd I made other tries with folders, and noticed that everytime I'd activate the horse, the music that was already playing (exploring music) would just restart, so I tried with the StreamMusic that should play a random city music: it still restarts the current music. http://cs.elderscrolls.com/constwiki/index.php/StreamMusic here it says that would happen only if a filename doesn't exist, but "StreamMusic Public" should be a random file from music\public folder, so I shouldn't have that kind of problem... edit2:ok, I read that page better, and I think this is my problem:To use this command in a cell with music-type "Default", you need to call StreamMusic random first, then wait for a frame for the command to be executed, and then use Streammusic "<filename>"fact is, how do I make a script that "waits for a frame" before using "StreamMusic "<filename>"?do I just writeStreamMusic randomStreamMusic "data\music\special\Trombe!.mp3"? I'm going to try this now, but I don't think it'll work... edit3:well, it KINDA works... but not really good. Sometimes it works fine, sometimes when you demount that music plays, and when you mount back it plays a random music... if you try many times it works, but it shouldn't be like this.. and when the music ends, it choses a random music, I hoped it would loop back.I don't think I'll be able to do better than this... Thanks again for your help... :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.