Infintive loop problem

eatbeaver

New Member
Code:
Microorganism
    Events
        Unit - A unit enters Reds area <gen>
    Conditions
        (Unit-type of (Triggering unit)) Not equal to Microorganism
    Actions
        Set Temppoint = (Center of Reds area <gen>)
        Set tempgroup = (Units owned by Player 1 (Red) of type Multicellular)
        Unit Group - Pick every unit in tempgroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in tempgroup) Greater than or equal to 3
                    Then - Actions
                        Custom script:   call RemoveLocation(udg_Temppoint)
                        Set Temppoint = (Position of (Random unit from tempgroup))
                        Trigger - Turn off (This trigger)
                        Unit - Create 1 Microorganism for Player 1 (Red) at Temppoint facing Default building facing degrees
                        Trigger - Turn on (This trigger)
                    Else - Actions
        Custom script:   call DestroyGroup(udg_tempgroup)
        Custom script:   call RemoveLocation(udg_Temppoint)
I only want 1 Microorgansim...
 

Azlier

Old World Ghost
Too bad we don't have a delete post function. I can't figure it out.
 

Jolly chap*

New Member
Why did you put turn off this trigger and turn on this trigger straight away? It would cancel each other out ... maybe that is your problem? Sorry don't have WE open ... again. :(
 

Kazuga

Let the game begin...
Code:
Microorganism
    Events
        Unit - A unit enters Reds area <gen>
    Conditions
        (Unit-type of (Triggering unit)) Not equal to Microorganism
    Actions
        Set Temppoint = (Center of Reds area <gen>)
        Set tempgroup = (Units owned by Player 1 (Red) of type Multicellular)
        [B]Unit Group - Pick every unit in tempgroup and do (Actions)[/B]
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in tempgroup) Greater than or equal to 3
                    Then - Actions
                        Custom script:   call RemoveLocation(udg_Temppoint)
                        Set Temppoint = (Position of (Random unit from tempgroup))
                        Trigger - Turn off (This trigger)
                        Unit - Create 1 Microorganism for Player 1 (Red) at Temppoint facing Default building facing degrees
                        Trigger - Turn on (This trigger)
                    Else - Actions
        Custom script:   call DestroyGroup(udg_tempgroup)
        Custom script:   call RemoveLocation(udg_Temppoint)
It's because of the unit group loop. It loops through all your unit and for each unit it checks if the unit group contains 3 or more of the unit.
 

Jolly chap*

New Member
Right. Take the If Then Else out of the Unit Group Action and then delete the Unit Group Action. You won't need it anymore.
 

darkbeer

Beer is Good!
in other words:

Code:
Microorganism
    Events
        Unit - A unit enters Reds area <gen>
    Conditions
        (Unit-type of (Triggering unit)) Not equal to Microorganism
    Actions
        Set Temppoint = (Center of Reds area <gen>)
        Set tempgroup = (Units owned by Player 1 (Red) of type Multicellular)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in tempgroup) Greater than or equal to 3
                    Then - Actions
                        Unit - Create 1 Microorganism for Player 1 (Red) at Temppoint facing Default building facing degrees
                    Else - Actions
        Custom script:   call DestroyGroup(udg_tempgroup)
        Custom script:   call RemoveLocation(udg_Temppoint)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    Would like to get some annual forum statistics report.
  • The Helper The Helper:
    there are stats in the xenforo forum admin section and we have matomo stats we started collecting beginning of the year so we will not have annual on that until next year
  • The Helper The Helper:
    I thought you had keys to the bathroom Tom? Ghan does Tom have access to the stats thread in the bathroom
  • The Helper The Helper:
    since I started jacking with the bots on the site we doubled our page views on the site in a week lol
  • The Helper The Helper:
    I have been having lots of fun
  • The Helper The Helper:
    we have had like 6000 views of the American Airlines economy class thread in the last week
  • The Helper The Helper:
    I ought to stick a travel affiliate link or something on that page to try and monetize that they are just going there and leaving it might even be bots I am not sure
  • The Helper The Helper:
    I just got into it with the Atari VCS Facebook Moderator I started trolling him and almost got banned
  • The Helper The Helper:
    They deleted one of my posts one time so I was trolling him on a help post I put up because I am evil I guess and bored and the guy handled it well I loved his attitude Atari has a good social media presence even if they do not have many games.
  • The Helper The Helper:
    The French Atari they call them even though they are like totally based in America they just have French Money coming in. Gotta love it
  • Ghan Ghan:
    Microsoft buying Activision Blizzard holy crap!
  • The Helper The Helper:
    I know right holy cow
  • Accname Accname:
    Thats not going to save it.
  • The Helper The Helper:
    It might
  • The Helper The Helper:
    They are going to use alot of that IP in the Metaverse
  • The Helper The Helper:
    I found a new section of the stats that is freaking interesting!
  • The Helper The Helper:
    oh yeah this is what I was looking for good job matomo! These are some sweet stats I am learning the interface on it too!
  • The Helper The Helper:
    If anyone ever asks later how I found out about it was watching the site bots but not watching what they were doing but asking myself why they were here?
  • The Helper The Helper:
    there must be a reason and ok that is it
  • The Helper The Helper:
    the past and the future all come together into one
  • The Helper The Helper:
    the search engines are what built thehelper.net the search engines will make it big again maybe
  • The Helper The Helper:
    the real question is are 5 million links better than 60 real good links?
  • The Helper The Helper:
    the answer is 60 lol
  • The Helper The Helper:
    unless you put 100k links on it lol then you get something

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome
    Top