I've managed to make a neutral bunker, as in, a bunker anyone can use (only 1 at a time though). For this I used the "Shop Sharing" system from Bifuu's hero tutorial and a Neural Parasite type Behavior (so you "capture" the Bunker by entering) which is applied to the bunker through the transport ability.
My problem is that when I exit the bunker, both it and my unit switch over to the neutral player. I have tried various "apply Behavior upon unloading" variants, but either I missed the "Player" reference to the unit owner or it just doesn't work.
I guess transports inflict a permanent mind control upon their cargo, which can't be traced back to the previous owner?
Does anyone have a trigger-free solution to this?
If you change the ability Target filters for the bunker load/unload toy include allies and neutrals, then you can just enter the bunker at will no matter whose it is. The only issue is if the bunker is a neutral player's bunker, you kinda cant get your unit back lol
I got it to work that far (I probably set the target filter too), and then applied a Neural Parasite Behavior clone to the Bunker, which gave me control over it. However, when I now order the unit to exit both the bunker and the unit belong to the neutral player (owner of bunker).
Did some testing: First of all, the Shop Sharing isn't needed. Second, the Neural Parasite Behavior mind controls the bunker when I enter, but is removed the moment I exit, thus I loose all references to said Behavior, and with it to the freight unit. I tired making the "freighter behavior" periodically recast the Neural Parasite, but I loose the reference for the Parasite the moment said periodic Behavior is removed, thus the bunker switches with the parasite still in place.
What annoys me most is that the trigger solution is a two-liner for one player, and should be easy for multiplayer too.
Its more so adding a bunker load ability to a unit and any player can enter. Since your wanting to modify the bunker the ability is already there you can skip that.
Just take a look at the triggers i made for it and try that.
My system is universal too. For single-player purposes the following trigger is enough:
Event: Any unit unloads
Condition: Unit type of triggering unit=Bunker (add an Or bracket with all your mounts)
Action: Set control of triggering freight unit to player 1
My only problem is I can't log the player for multi-player maps, but your system doesn't seem to do that either. I guess you have to keep track of all existing mounts with an integer array and assign each integer the owner of the pilot when he enters, so you can call that variable as the player number. Sounds like a lot of work.
I've managed to make a neutral bunker, as in, a bunker anyone can use (only 1 at a time though). For this I used the "Shop Sharing" system from Bifuu's hero tutorial and a Neural Parasite type Behavior (so you "capture" the Bunker by entering) which is applied to the bunker through the transport ability. My problem is that when I exit the bunker, both it and my unit switch over to the neutral player. I have tried various "apply Behavior upon unloading" variants, but either I missed the "Player" reference to the unit owner or it just doesn't work. I guess transports inflict a permanent mind control upon their cargo, which can't be traced back to the previous owner? Does anyone have a trigger-free solution to this?
If you change the ability Target filters for the bunker load/unload toy include allies and neutrals, then you can just enter the bunker at will no matter whose it is. The only issue is if the bunker is a neutral player's bunker, you kinda cant get your unit back lol
I got it to work that far (I probably set the target filter too), and then applied a Neural Parasite Behavior clone to the Bunker, which gave me control over it. However, when I now order the unit to exit both the bunker and the unit belong to the neutral player (owner of bunker).
@Photoloss: Go
Did some testing: First of all, the Shop Sharing isn't needed. Second, the Neural Parasite Behavior mind controls the bunker when I enter, but is removed the moment I exit, thus I loose all references to said Behavior, and with it to the freight unit. I tired making the "freighter behavior" periodically recast the Neural Parasite, but I loose the reference for the Parasite the moment said periodic Behavior is removed, thus the bunker switches with the parasite still in place. What annoys me most is that the trigger solution is a two-liner for one player, and should be easy for multiplayer too.
I actually have a tutorial made that can help you with this. http://forums.sc2mapster.com/development/tutorials/1164-data-trigger-mount-vehicle-system
Its more so adding a bunker load ability to a unit and any player can enter. Since your wanting to modify the bunker the ability is already there you can skip that.
Just take a look at the triggers i made for it and try that.
Thanks, but I would like a trigger-free version. I've got the loading part set, but unloading still causes problems.
from what I see its not really possible. besides that trigger is universal for all bunkers/units created throughout the map
My system is universal too. For single-player purposes the following trigger is enough:
My only problem is I can't log the player for multi-player maps, but your system doesn't seem to do that either. I guess you have to keep track of all existing mounts with an integer array and assign each integer the owner of the pilot when he enters, so you can call that variable as the player number. Sounds like a lot of work.
Wow in that tutorial I forgot to add that. Thanks for pointing that out I need to go updated it now
And all it is, is just a copy paste job,each copied trigger would only take 5 seconds tops of attention to fix to player