Results 1 to 4 of 4

Thread: BaseMissionPath

  1. #1
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    BaseMissionPath

    Is it possible to use that BaseMissionPath (from the playing a .wav ) when writing files?

    I can read and write files, but always have to specify the user in the path, I'm wondering if the above can be used somehow when putting together the string for the file path. Because it is awesome for playing .wavs. Totally.
    I am Yo-Yo not YoYo (that's someone else)

  2. #2
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: BaseMissionPath

    Oh yes it can, just got it into a string. I was being way too overcomplicated.

    Please ignore me.

    Code:
    using System;
    using System.IO;
    using System.Collections;
    using System.Collections.Generic;
    using maddox.game;
    using maddox.game.world;
    using System.ComponentModel.Design;
    using System.Diagnostics;
    using maddox.GP;
    
    public class Mission : AMission
    {
        
        public override void OnBattleStarted()
    
       {
    
            MissionNumberListener = -1;
    
    		string path = BaseMissionPath+"blah.txt";
    
            GamePlay.gpHUDLogCenter(path);
    
        }
    }
    (I know this isn't writing or reading to a file, just leaving it here to demonstrate it going into a string for people learning scripting like me.)
    Last edited by Yo-Yo; Mar-21-2023 at 20:16.
    I am Yo-Yo not YoYo (that's someone else)

  3. #3
    Combat pilot Veteran66's Avatar
    Join Date
    Jan 2013
    Posts
    114
    Post Thanks / Like
    Total Downloaded
    206.20 MB

    Re: BaseMissionPath

    you try this:

    System.Media.SoundPlayer player = new System.Media.SoundPlayer(BaseMissionPath + "Sing.wav");


    Link:
    https://theairtacticalassaultgroup.c...972#post383972
    My System:
    Windows 11
    RAM 64,0 GB
    Intel i7 3.80GHz
    NIVIDIA GeForce RTX 3070

  4. #4
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: BaseMissionPath

    Yes thanks, that's where I found it, I am using it to write to txt files but for some reaosn was having a block when it came to putting it in a string for the savepath. All sorted now thanks.
    I am Yo-Yo not YoYo (that's someone else)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •