Knuckle Cracker

Particle Fleet => Map Makers, Ship Builders, and Coders => Topic started by: Nicant on December 18, 2016, 11:12:25 AM

Title: How to turn stunners into good stunners
Post by: Nicant on December 18, 2016, 11:12:25 AM
Well, I've ran into another problem with my custom module once more that i cannot figure out a fix for. So, what my module i going to do is find a nearby enemy stunner and convert it into a good stunner, but it seems i cannot do that. If you look at the end of the script below, you can see I've used <-Target.UnitIsEnemy not ->Target.UnitIsEnemy . For whatever reason, once the module "converts" the stunner, the stunner still comes after the player's ship and stuns the ship. I believe doing that command brings the stunner to a "neutral" team where it goes after enemy and player ships, but i have no idea as i have not tried that yet. Anyways, what i need help on is making the stunner go on the blue team, aka, the player team. Blue stunners are more of a magenta color, while the "neutral" stunners are purple. As always, any help will be greatly appreciated! :)

Edit: Found the problem! The problem is when my module converts a stunner, the stunner becomes on the blue team, but still targets a player ship because my module would only change the fact that it is an enemy and not the target
Title: Re: How to turn stunners into good stunners
Post by: GoodMorning on December 18, 2016, 05:26:31 PM
If you wouldn't mind cleaning it up, then people searching for the same problem can use it to save them the time you spent.