• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Worker ship doesn't script-build

Status
Not open for further replies.
Level 20
Joined
Nov 20, 2005
Messages
1,178
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?
 
Level 20
Joined
Nov 20, 2005
Messages
1,178
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.
 
Level 13
Joined
Oct 31, 2017
Messages
128
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.
 
Level 20
Joined
Nov 20, 2005
Messages
1,178
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.
 

Attachments

  • trigger.jpg
    trigger.jpg
    80.6 KB · Views: 84
Status
Not open for further replies.
Top