Results 1 to 2 of 2

Thread: Converting to campaign mission - has something changed?

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

    Converting to campaign mission - has something changed?

    Sorry, me again. Has something changed with how to convert a single mission scropt for use in a campaign or am I just not remembering how to do it properly?

    I thought it used to just be a case of swapping

    Code:
    public class Mission : AMission
    to

    Code:
    public class Mission : maddox.game.campaign.Mission
    But it doesn't seem to be workign and if I put it in the mission builder and use the compile there it says:

    error CS0234: The type or namespace name 'campaign' does not exist in the namespace 'maddox.game' (are you missing an assembly reference?)

    Am I indeed missing a reference and how do I fix that?

    So an example here, this works as a single mission:

    Code:
    using System;
    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()
        {
        GamePlay.gpHUDLogCenter("On battle started");
        }
    }
    But if I modify that one line so that the code reads:

    Code:
    using System;
    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 : maddox.game.campaign.Mission
    {
    
        public override void OnBattleStarted()
        {
        GamePlay.gpHUDLogCenter("On battle started");
        }
    }
    It doesn't work.

    What am I doing wrong?
    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: Converting to campaign mission - has something changed?

    Ah figured it out, I checked the default campaign and grabbed this from it and put it at the top. Seems to work now.

    Code:
    //$reference Campaign.dll
    //-$debug
    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
  •