Spawning - Loading - Sending?

emilemil1

New Member
Reaction score
20
I am trying to make a loop with 5 players, each with their own set of units.

This trigger is supposed to create a boat, loop the creation action and the load ability on the created unit, and when all units has been loaded it should leave the shore and the next player would have his boat created and so on...

I have modified the event, it should be every 120 seconds, so the problem is not that the waits makes it doubleexecute.

Every time i make a little change i get one of 3 outcomes:

1. The boat waiting a few seconds, then moving on. With waits.
2. The boat loading the first time, then moving on(that far flawlessly), but when running the second time it does not load the unit, it also refuses to load unit groups with more than one unit. I don't know what i did this time.
3. The boat is created, tries to load the unit, but is interrupted by the move action coming after. This is with no waits in.

I tried with game messages to detect what went wrong, and it turned out that the last set of triggers (the ones moving the ship and cleaning) would not run if a wait is placed there.

Any solutions?

EDIT: I detected a tiny mistake, fixed it, but still running wrong.

Code:
Heaven Naval
    Events
        Time - Every 10.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in NavalForces[(Integer A)]) Equal to 0
                    Then - Actions
                    Else - Actions
                        Set NavalRunning[(Integer A)] = True
                        Unit - Create 1 Human Light Transport Ship for (Player((Integer A))) at HeavenNavalPoint facing 180.00 degrees
                        Set Temp_Unit = (Last created unit)
                        Unit - Set level of Cargo Hold (Ship) for (Last created unit) to ((Current research level of Improved Cargo for (Owner of (Last created unit))) + 1)
                        Unit - Change ownership of (Last created unit) to Player 6 (Orange) and Retain color
                        Set Temp_Group = NavalForces[(Integer A)]
                        For each (Integer B) from 1 to (Number of units in Temp_Group), do (Actions)
                            Loop - Actions
                                Wait 0.50 seconds
                                Set Temp_Unit2 = (Random unit from Temp_Group)
                                Unit - Create 1 (Unit-type of Temp_Unit2) for (Player((Integer A))) at HeavenNavalPoint facing Default building facing degrees
                                Unit Group - Remove Temp_Unit2 from Temp_Group
                                Unit - Order Temp_Unit to Load (Last created unit)
                                Set X = (X + 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                X Equal to (Number of units in NavalForces[(Integer A)])
                            Then - Actions
                                Set X = 0
                                Custom script:   call DestroyGroup (udg_Temp_Group)
                                Wait 1.00 seconds
                                Unit - Order Temp_Unit to Move To HellNavalTarget
                                Set NavalRunning[(Integer A)] = False
                            Else - Actions
                Wait 1.00 seconds
 

emilemil1

New Member
Reaction score
20
Oh, forgot to close this, i figured out that i had to separate the spawning and loading procedure into 2 loops to make it work. But it's fixed now.

But I do have another issue now xD

The boat turns around and faces all 15 units (my unit cap) but it only loads 10 of them into the cargo. The last 5 are just beeing looked at for 0.75 sec.

Since it works up to 10 I'm guessing it is something about max cargo. I have it set to 15. But is there a gameplay constant or something blocking my setup? (like with movementspeed)

The delivery is flawless though :/

I'm also wondering, if a boat is destroyed in shallow water with units in its cargo. Does the units die or become released?

I have to take the answers/solutions tomorrow :)

GN and THX in advance.
 

Samael88

Evil always finds a way
Reaction score
181
I don't think that it is even possible to load more than a maximum of 10 units in any cargo-thing:( It's the game that has limitations there.

You could solve it by having a dummy transporter at the point of the ship, but it would take a lot more triggering.

The shallow water thing, test it, how much time could it take to test it yourself, 10mins max?
Whatever happened to "trial and error"? That is how we did it when I was young:p
 

emilemil1

New Member
Reaction score
20
Damn :/ i guess i can reduce the cap and the spawn time to even it out. But that could cause collisions :/ damn again. I have to copy the trigger with new variables :/

+rep | thx for the info

About the trial and error

I had shut down WE and was going to bed. Otherwise i would ofc not ask it here :) Just a little side Q
 
General chit-chat
Help Users
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top