1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Solved] Worker ship doesn't script-build

Discussion in 'Triggers & Scripts' started by LordPerenoldeII, Jun 19, 2018.

  1. LordPerenoldeII

    LordPerenoldeII

    Joined:
    Nov 20, 2005
    Messages:
    874
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Hello guys.
    I have oil platforms, built on patches. Patches are essentially goldmines, platforms are entangled mines with anphibious-pathable and ground-pathable placement requirements. Patches are on small shallow water hills to allow building placement in open sea.
    If i order one of my worker ships to build a platform like this everything is ok, but if i script an enemy ship to do the same, they just walk over the patch and stop.
    I also tried to script my own ships to do it, and i see the phantom image of the platform over the patch, like it's gonna be built, but again, the ship stops right over the patch.
    How can i make it work?
     
  2. Wark

    Wark

    Joined:
    Oct 12, 2016
    Messages:
    743
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Are you using an AI script or triggers?
     
  3. LordPerenoldeII

    LordPerenoldeII

    Joined:
    Nov 20, 2005
    Messages:
    874
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Gui triggers.
     
  4. Wark

    Wark

    Joined:
    Oct 12, 2016
    Messages:
    743
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Care to show the trigger that's ordering the upgrade/build/entangle?
     
  5. LordPerenoldeII

    LordPerenoldeII

    Joined:
    Nov 20, 2005
    Messages:
    874
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Simply a single-lined gui function compiled as follows(in short):
    Unit - Order Tanker to build a Oil Platform at Position of Oil Patch.

    Whether is a cpu tanker or mine, the unit responds, travels to the location(a "hologram" of the platform confirmed to build also appears at the designed spot) but once it arrives it stops.
    If i but manually order the unit to build the platform it does it normally.
     
  6. SgtWinter

    SgtWinter

    Joined:
    Oct 31, 2017
    Messages:
    72
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Yo, Pere-pere! Don't know if your problem has been solved yet or not, but have you checked if the Oil Platform structure has the correct Blighted Gold Mine ability or is a direct copy of the Haunted Gold Mine unit? I think it has more to do with the unit or AI than the trigger. Sometimes a stray stat in the Object Editor can cause some problems or contradict a trigger.
     
  7. LordPerenoldeII

    LordPerenoldeII

    Joined:
    Nov 20, 2005
    Messages:
    874
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Looool i missed pere-pere! Love the shortie-joke! xD
    I've already checked the blighted ability(actually has to be "entangled"), but still ot didn't solve the problem. In the end i managed to solve it with a weird workaround that did the trick.
     
  8. Kaijyuu

    Kaijyuu

    Joined:
    Jun 2, 2004
    Messages:
    848
    Resources:
    0
    Resources:
    0
    Do enlighten us with your weird tricks!
     
  9. LordPerenoldeII

    LordPerenoldeII

    Joined:
    Nov 20, 2005
    Messages:
    874
    Resources:
    2
    Maps:
    2
    Resources:
    2
    here:
    Basically when an enemy tanker enters the oil patch area, it disappears and a dummy platform replaces the patch with a build animation to simulate the construction being made.
    The 15 seconds are the virtual "build time" which is normally double for the player's own platform, but this is to prevent premature destruction of the platform, which would lead to some kind of discontinuum issue i wouldn't be able to deal with yet.
    After the real platform appears, a new tanker appears close to it, to simulate the building unit coming from inside the structure.
    Lastly, the newly created tanker receives a command to right click the platform and start mining its oil.
     

    Attached Files: