So I've been trying to get back into Brood War mapping. I have Larva spawning at a Hatchery that I want to move to another location on the map, give them to another player and have them wander there without trying to walk back to the Hatchery. I tried doing Junk Yard Dog and various other AI-based things. After hours of work, I had no luck. Maybe I was just doing it wrong. A solution to my problem would be glorious.
Post has been edited 1 time(s), last time on Feb 27 2013, 5:37 am by Alzarath.
None.
I'm not sure you need to do any AI scripts, I think they just wander there. I'm not sure you're able to give larva from one player to another using triggers, so that might be your problem.
None.
I'm not sure you need to do any AI scripts, I think they just wander there. I'm not sure you're able to give larva from one player to another using triggers, so that might be your problem.
I can definitely give the larve to other players with triggers. Moving them without doing anything else, they'll try to walk back to the Hatchery.
None.
Oh. Why not remove the hatchery after moving the larva so that they do not walk back.
None.
An artist's depiction of an Extended Unit Death
Moving or giving larvae that are owned by Hatcheries resets their order, which will make them move toward the Hatchery again. You can set their order through either Junk Yard Dog or Make These Units Patrol (using Set Generic Command Target to set the point to which they'll move).
The only way to completely detach larvae from their Hatchery (that I know of) is to kill/remove the Hatchery. If that's an option for you (kill/replace Hatcheries in a cyclical fashion to create your larvae), it may work out well. Refer to my attached map.
Attachments:
Moving or giving larvae that are owned by Hatcheries resets their order, which will make them move toward the Hatchery again.
That explains it. Thanks Roy. I was thinking of giving the replacing Hatchery thing a try, but I was worried it'd be more work than necessary. Oh well, thanks again.
None.
I've done some playing around with Roy's sample map and found some interesting things. All you need to do is have the larva owned by a CPU player an Execute AI Script At Location 'Make these units patrol'. The patrol command protects the larva from dying.
1. It's possible to move larva onto standard terrain without them dying - they don't need to be moved to creep tiles first.
2. You can move the larva around to different locations and they'll patrol back to the location they were previously moved to.
3. You can give the larva to human players, but if you move them again after that, they will need to be moved to creep tiles or they die.
There's some limits on the above:
1. You need to order the larva, then wait 2 DCs before moving them to their new location or they will lose their patrol command. Waiting 0 or 1 DCs isn't enough.
2. After moving them to a new location, you need to wait 1 DC before moving them again, or they will lose their patrol command.
3. After moving them to a location, you need to wait 1 DC before giving them to the human player, or they will lose their patrol command and hence die.
Sample map attached.
Attachments:
None.
Last I played around with this I moved the larva and then gave them to another player (fairly certain of this, anyway).
None.