Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

[SOLVED] Just a popup message

Discussion in 'Programming Questions and Suggestions' started by Inferi, Apr 21, 2017.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Inferi Apprentice Engineer

    Messages:
    138
    Hi.
    Been away for a long while.

    I am looking for a very basic popup message script "NOT ingame programable block script but a real C# file".

    Anyone know how that is made?
    --- Automerge ---
    Anyone? No need for at popup window, just a message on the screen would work.
     
  2. Inferi Apprentice Engineer

    Messages:
    138
    Really, noone knows this or have any working code that I can check out? I was thinking it was something easy. But then again, maybe not?
    --- Automerge ---
    This is the code:
    Code:
    using System;
    using System.Linq;
    using System.Text;
    using System.Collections;
    using System.Collections.Generic;
    
    using VRageMath;
    using VRage.Game;
    using VRage.Collections;
    using Sandbox.ModAPI.Ingame;
    using VRage.Game.Components;
    using VRage.Game.ModAPI.Ingame;
    using Sandbox.ModAPI.Interfaces;
    using Sandbox.Game.EntityComponents;
    using SpaceEngineers.Game.ModAPI.Ingame;
    using VRage.Game.ObjectBuilders.Definitions;
    
    using Sandbox.ModAPI;
    
    
    namespace helloUser {
    
        [MySessionComponentDescriptor(MyUpdateOrder.BeforeSimulation)]
    
        public sealed class helloUser : MySessionComponentBase {
            //=======================================================================
            //////////////////////////BEGIN//////////////////////////////////////////
            //=======================================================================
            public bool _hasRun;
    
    
    
            public override void UpdateBeforeSimulation() {
                if (MyAPIGateway.Session?.Player?.Character == null || _hasRun) {
                    return;
                } else {
                    MyAPIGateway.Utilities.ShowNotification("Test message\nNew row", 30000);
                    _hasRun = true;
                }
            }
    
            //=======================================================================
            //////////////////////////END////////////////////////////////////////////
            //=======================================================================
        }
    }
     
Thread Status:
This last post in this thread was made more than 31 days old.