• 0

    posted a message on Integer Increase in Objective Event

    @Incr3dibad: Go

    nevermind, it fixed itself when i reloaded the editor a few times.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Integer Increase in Objective Event

    Sorry to resurrect an older post, but this is all i could find... I am having the same problem, example of my code is...

    Global Variable -  DestroySpawners = No Objective <Objective>
    
    Trigger - CreateBuildingsToKillObjective (Runs after initialization)
    
            Objective - Create a Hidden Primary objective with text ("Destroy the Spawners: " + ((Text(DeadBuildingsNumber)) + ("/" + (Text(NumberOfBuildingsArea01))))) and description ""
    
            Variable - Set DestroySpawners = (Last created objective)
    
            Objective - Mark DestroySpawners as Active
    
    Trigger - BuildingDies
    
        Events
            Unit - Any Unit dies
        Local Variables
            index = 0 <Integer>
    
            General - For each integer index from 0 to 13 with increment 1, do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Triggering unit) == (Unit 1 from UnitGroupBuildingsArea01[index])
                        Then
                            Variable - Set BuildingNumber[index] = 1
                            Variable - Modify DeadBuildingsNumber: + 1
                            Objective - Set DestroySpawners text to ("Spawners Destroyed: " + ((Text(DeadBuildingsNumber)) + ("/" + (Text(NumberOfBuildingsArea01)))))
                        Else
    

    What should happen, is when you destroy a "Spawner" building, it updates the objective text to read "Spawners Destroyed: 1/4" where the "1" is the number of buildings that have been destroyed.

    Currently it is not updating the objective with the "Set Text" if it contains any sort of variable, however if i change the line of code to:

    Objective - Set DestroySpawners text to "This is retarded"

    ...it works.

    is this a bug in the editor, or am i missing something fundamental here?

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.