ebmar

Members
  • Content Count

    1,197
  • Joined

  • Last visited

  • Days Won

    45

ebmar last won the day on August 4 2023

ebmar had the most liked content!

Community Reputation

893 Jedi Grand Master

About ebmar

  • Rank
    Caffeinated Sith Lord

Profile Information

  • Gender
    Male
  • Location
    : Dromund Kaas

Recent Profile Visitors

76,587 profile views

Single Status Update

See all updates by ebmar

  1. Well, I will never look at mods the same again after knowing how scripts was made and how they works. Straight stars for mods with any scripts init. :respect:

    1. Show previous comments  3 more
    2. ebmar

      ebmar

      Quote

      Keep in mind that nwscript.nss shows you the form that various script elements must take. Templates if you will. You don't just use them as-is in an actual script.

      Thanks! I'll keep 'em noted. And with the script above, as I'm trying to input the "oArea" part- what command should I enter? The particular area will be DANM14AC [Dantooine].

    3. DarthParametric

      DarthParametric

      You can make a variable declaration like:

      object oArea = GetArea(GetFirstPC());

      Which will get the current area you are in. That way you don't need to specify a custom value for every module you use the script in.

      I believe that command changes the module's music track to a different one listed in ambientmusic.2da (which is what nTrack is - an integer value for the row number). So your script would be something like:

      void main() {
      	
      	object oArea = GetArea(GetFirstPC());
      	int nTrack = 99; // Insert ambientmusic.2da row number here
      	
      	MusicBackgroundChangeDay(oArea, nTrack);
      }
    4. ebmar

      ebmar

      Quote

      That way you don't need to specify a custom value for every module you use the script in.

      Thanks for the heads-up!

      Quote

      I believe that command changes the module's music track to a different one listed in ambientmusic.2da (which is what nTrack is - an integer value for the row number). So your script would be something like:

      Spoiler
      
      
      void main() {
      	
      	object oArea = GetArea(GetFirstPC());
      	int nTrack = 99; // Insert ambientmusic.2da row number here
      	
      	MusicBackgroundChangeDay(oArea, nTrack);
      }

       

       

      That looks promising! I'll fiddle with 'em soon!

      Again, many thanks for the help! :cheers: