• 0

    posted a message on I got problems...

    If you are confused on the math behind sorting a set of numbers, you can google "array sort algorithm" and get lots of good information about different ways to sort stuff.

    If you are confused on how to implement such an algorithm in the sc2 editor, there is actually a templete by blizzard. In the trigger editor, click view and make sure "Show Libraries" is check. Then open Built-In>Template>Algorithms to see some example actions that sort an array of scores. You can also just search your question on this website to find other threads about this.

    Posted in: Triggers
  • 0

    posted a message on Record / Strut Help. Please

    @cam55555: Go

    The variable that references a record should be global, not local.

    Make your record, then make a new global variable of type "- Record" and set the record slot to the name of your record. In your trigger you will then reference that global variable to save or get values inside the record.

    Posted in: Triggers
  • 0

    posted a message on 1350 doodads in a Tower Defense map?

    This thread discusses the issue a bit. In short, most blizzard maps have around 2000 as a limit, with a few reaching around 3000.

    Posted in: Terrain
  • 0

    posted a message on Change volume of individual units

    I'd like the ability to spawn a unit, then set all sounds created by that unit to a specific volume or just mute the unit entirely. It really seems like I should be able to do this with SendActorMessagetoUnit - Sound Set Volume/Sound Set Muted, but I cannot seem to get these actions to produce any results.

    The only action I can get to work right now is Set Sound Channel Volume. If I use this then I'd need to modify all the sounds I'm using to make sure all sounds of the same volume are in the same channel. Doable but seems like an ugly work around as I'd have to edit data every time I use a new unit/sound.

    Any simple solution to this?

    Posted in: Triggers
  • 0

    posted a message on Display 'Ghost Nuke Target' Model through structures

    I haven't worked with channel abilities myself, but my understanding is that they just root the casting unit in place for the duration of the channel. It is possible that because an effect from a trigger doesn't have a casting unit, the channel period is skipped.

    I think the reason main you can't use the Ghost Nuke Persist effect alone is because it is triggering waaaaay more than you want it to. Nuke Persist actually does cause the desired indicator to appear, but it is for such a brief period of time you can't actually see it. To prove this, you can go to the Nuke Target model and remove Effect.NukePersistent.Stop - AnimBracketStop BSD, then running Nuke Persistent from triggers will make the indicator appear infinitely, along with playing the nuke animation.

    So in short Ghost Persist does work, it just works for such a short period of time that you don't actually notice, and then it continues doing things when you want it to stop.

    Posted in: Data
  • 0

    posted a message on (solved) Unit Follow Range

    @TheSkunk2: Go

    That's why I suggested a dummy unit. I imagine you'd set up two units in the data editor, then do something in the trigger editor like this:

    Spawn two platforms at the same location, one that is untargetable and one with a no collision footprint. You can then visually hide the untargetable one with SendActorMessagetoUnit - Set Opacity 0 (the Hide Unit action makes it so you can't interact with a unit). This should create the effect you want in regards to platforms. Then you just need to link them somehow so that one dies, you kill the other with a trigger. Either save them to arrays/records at matching spots, or just search for units on death. ie

    • Event - Unit dies - Unit Type CustomPlatformNoFootprint
    • Pick each unit within 0.2 of triggering unit of type CustomPlatformUntargetgable
    • Remove Picked Unit from the game

    It is a little bit of a hack, but I imagine it would function very well.

    Posted in: Data
  • 0

    posted a message on (solved) Unit Follow Range

    @TheSkunk2: Go

    Looks like this can also be done by modifying the unit's footprint. Changing the supply depo's footprint from 2x2 Underground to 2x2 No Collision seemed to allow for proper right click movement while maintaining a+left click targeting. Not sure how this would affect units walking on top of floating platforms, so if that interaction gets messed up you may need to use some sort of dummy unit to readd ground collision.

    Posted in: Data
  • 0

    posted a message on (solved) Unit Follow Range

    If you don't actually need to interact with the buildings then adding the untargetable flag to the unit you want to walk on top of will accomplish this.

    Posted in: Data
  • 0

    posted a message on Changing unit heights reading with triggers

    There is also a Change Unit Height action and you can set any real variable equal to the unit property of height for comparison.

    Posted in: Triggers
  • 0

    posted a message on Display 'Ghost Nuke Target' Model through structures

    The nuke target actor has two important lines, one of which you found.

    • Host - Actor: Creation
    • Host - Subject: GhostNukeTargetBillboard

    If you set both of those values on a unit actor you get the error "This SiteOp only works on actors created directly from effects or via the Create message sent to actors that were created directly from units", so using a unit with a changed model won't work for maintaining the effect. However there is a simple solution.

    Create a new Effect (ie CreateCustomIndicator) of type Create Persist and set the Effect: Period Count and Effect: Period Durations fields to give the ability a max length. Then go to the Ghost Nuke Target actor (or create a new actor that is copied from it), add a new event of Effect.CreateCustomIndicator.Start, then change its action to Create. Another another event of Effect.CreateCustomIndicator.Stop with the action Destroy.

    With that set up you can use a trigger to execute CreateCustomIndicator at a target point, then either let it manually expire or remove it with the Destory Effects action.

    Posted in: Data
  • 0

    posted a message on Change player color in score screen?

    For some reason the post game loading screens are stuck loading infinitely so I can't actually test anything, but there is a setting you can try.

    Map > Game Variants > Player Attributes > Hidden Attributes > Color

    This prevents players from having the option from selecting their color in the lobby and it MIGHT remove color form showing in the post game screen, but again I can't actually test myself. If that does happen to work you could mess around with Score Results or Score Values in the Advanced Game Data section of the data editor to try and show country name is the post game screen. Other than that I don't see much else that can be done in the way of your two ideas.

    An entirely different solution that I know works is just making your own score screen that shows in game before players leave, then not showing the default one at all. It is more work to set up but allows for even more customization.

    Posted in: Data
  • 0

    posted a message on SC2 Race Categories (Probably in the wrong place)

    Open a new tab in the data editor, go to edit advanced game data, then races.

    Posted in: Data
  • 0

    posted a message on Morph Placeholder Unit?

    @ItemsGuy: Go

    Take a look at the zerling/baneling interaction for reference, specifically the ability Zergling - Morph (Zergling -> Baneling). Note that it isn't a morph ability, but instead a train ability. I was able to copy emulate it and make an ability that turned a probe into a baneling cocoon and then a goliath. A few things to note with this:

    • The cost of the ability is controlled by the cost of the final unit, goliath.
    • Hiding the probe during morph is done via event handlers in the probe actor. Look at the zergling actor for reference.
    • Using baneling cocoon as the morph unit allowed me to rally the unit during morph, but did not allow me to cancel the morph at all. Using a different unit as morph unit resulted in various bugs. I'll leave you to resolve that interaction.
    Posted in: Data
  • 0

    posted a message on Tinted team color

    @Sendlirn: Go

    Create a new trigger with an event of Unit is Created, then under the action section you use Send Actor Message to Unit with a message type of something like Set Tint or Set Team Color. Use Created Unit to reference the current unit.

    Assuming you want to tint units different colors based on who they belong to, you'll need to use a switch statement that switches the owner of the created unit and have one send actor message per player.

    Posted in: Data
  • 0

    posted a message on How to allow Photon Overcharge to cast on other units?

    @bobthebuilder117: Go

    This ability should be no more confusing than any other in the editor. You just need to follow the chain of actions that are happening until you find the field you are looking for. Start with the unit, then move to ability, then to effect(s), then to behavior(s).

    • The mothership core as an ability called Mothership Core - Purify Nexus
    • The ability Purify Nexus applies an effect called Mothership Core - Apply Purify (AB)
    • The Apply Purify effect has a validator called Is Nexus. Removing this validator allows the ability to be cast on any unit.
    Posted in: Data
  • To post a comment, please or register a new account.