• 0

    posted a message on Galaxy++ editor

    Hi, your editor crashes upon folding multiple functions.

    Also is there no way to make arrays of classes? Example: SampleClass[4] *SClass;

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    Hi, I enjoy your optimized galaxy language. Your editor seems to have several issues, as such I recommend working on just the compiler (which can then be attached to an editor/IDE of your choice).

    Anyways I saw your editor today and decided to give it a shot. It unfortunately fails (does not report any errors, just crashes) with the following code. It's probably something to do with the code, I recently started programming in galaxy (recently being, today).

    #trigger MeleeInitialization
    {
        #events
        {
            TriggerAddEventMapInit(MeleeInitialization);
        }
        #actions
        {
            MeleeInitResources();
            MeleeInitUnits();
            MeleeInitAI();
            MeleeInitOptions();
        }
    }
    
    #class ZI_UnitGroup
    {
        unitgroup unitgrpCurrent;
    
        ZI_UnitGroup()
        {
            unitgrpCurrent = null;
        }
    
        void Create()
        {
        	if(unitgrpCurrent != null) return;
    
        	unitgrpCurrent = UnitGroup(null, -1, RegionCircle(null, 0), null, 0);
        }
    
        void AddUnit(unit unitNew)
        {
    		UnitGroupAdd(unitgrpCurrent, unitNew);
        }
    }
    
    
    // This class allows manipulation of a unit.
    #class ZI_Unit
    {
        unit unitCurrent;
    
        ZI_Unit()
        {
            unitCurrent = null;
        }
    
        void Create(string strUnitName, int iPlayer, point ptLocation, point ptFacing)
        {
            libNtve_gf_UnitCreateFacingPoint(1, strUnitName, 0, iPlayer, ptLocation, ptFacing);
            unitCurrent = UnitLastCreated();
        }
    
        void Destory()
        {
            if(unitCurrent == null) return;
    
            UnitKill(unitCurrent);
        }
    
        void Remove()
        {
            if(unitCurrent == null) return;
    
            UnitRemove(unitCurrent);
        }
    
        void MakeInvulnerable(bool bInvunl)
        {
            if(unitCurrent == null) return;
    
            libNtve_gf_MakeUnitInvulnerable(unitCurrent, bInvunl);
        }
    
        void AttackGroundAtPoint(point ptAttack)
        {
            if(unitCurrent == null) return;
    
            UnitIssueOrder(unitCurrent, OrderTargetingPoint(AbilityCommand("Attack", 0), ptAttack), c_orderQueueReplace);
        }
    
        bool HasBehavior(string strBehaviorName)
        {
            if(unitCurrent == null) return false;
    
            return UnitHasBehavior(unitCurrent, strBehaviorName);
        }
    
        bool IsAlive()
        {
            if(unitCurrent == null) return false;
    
            return UnitIsAlive(unitCurrent);
        }
    }
    

    Nothing special, just some basic encapsulation of raw galaxy functions. It crashes once I added once I added some methods to the ZI_Unitgroup.

    Posted in: Third Party Tools
  • To post a comment, please or register a new account.