Preserver Glow

DonMushroom

Member
Reaction score
4
Hi again :)

I was wondering if it is possible to change the color of the preserver glow from blue ti player colored :)
 

Dave312

Censored for your safe viewing
Reaction score
269
That 'glow' is built into the model. You would need to edit the model/model skin and change it that way.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293

DonMushroom

Member
Reaction score
4
That is exactly what i need but the file just seems to be a load of random text and there is no instructions of what to do. :(

Am i missing something?
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
It is a test map file. It should have the .SC2Map extension. Try opening it in the editor.

There are several things to do to get this to work.

1. Export all the textures from the import editor and import them back into your own map.
2. Go back into the test map, open up the data editor and go to the "Edit Art and Sound Data>Textures"
3. Set the data source to "Preserver_TeamColor.SC2Map"(so you only see modified objects)
4. Copy all of custom textures over to your map.
5. Go to the PreserverA model and copy the ":Texture Declarations + field to your own map's PreserverA model. (If you select the field, press ctrl + c, change to your map and select the field again and press ctrl + v, you'll copy it)
6. When you create your Preservers, use the "Send Actor Message To Unit" action to send the "Texture Select by Id" message with the parameter "TeamColor_PlayerX"(where X is the player you created the preserver for. Send the actor message to the newly created preserver.
7. (Optional - if you want to remove a lot of the glow) Do the same thing as 6) but with the "NoGlow" parameter instead of "TeamColor_PlayerX"
8. Do the same thing as 6) but with the "Preserver_TeamColor" parameter.
9. (Optional - if you want more glow) Do the same thing as 6) but send the message "Set Tint Color". In the color parameter, set HDR multiplier to 2.

What you're actually doing is changing the texture of the unit. This is a rather complicated process that is explained in more detail here.
 

DonMushroom

Member
Reaction score
4
Ok so now i have loads of different colored preservers :)

I need to find a way to set the glow color at the start of the game to be the same as the players. Does anyone have any idea about how i should go about this? :)
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Ok so now i have loads of different colored preservers :)

I need to find a way to set the glow color at the start of the game to be the same as the players. Does anyone have any idea about how i should go about this? :)


6. When you create your Preservers, use the "Send Actor Message To Unit" action to send the "Texture Select by Id" message with the parameter "TeamColor_PlayerX"(where X is the player you created the preserver for. Send the actor message to the newly created preserver.
7. (Optional - if you want to remove a lot of the glow) Do the same thing as 6) but with the "NoGlow" parameter instead of "TeamColor_PlayerX"
8. Do the same thing as 6) but with the "Preserver_TeamColor" parameter.
9. (Optional - if you want more glow) Do the same thing as 6) but send the message "Set Tint Color". In the color parameter, set HDR multiplier to 2.


Basically, you just do what I just quoted but for all the preservers. Here's a trigger that should do that. It would be easier to do it with custom script(there is an example custom script in the map), but for GUI, I would create a - Game Link - Texture variable array where you store all the different "TeamColor_PlayerX" textures. So the texture at index 1 is "TeamColor_Player1".

Trigger:
  • Create Preservers
    • Events
      • Game - Map initialization
    • Local Variables
    • Conditions
    • Actions
      • Player Group - Pick each player in (Active Players) and do (Actions)
        • Actions
          • Unit - Create 1 Preserver (A) for player (Picked player) at Point using default facing (No Options)
          • Actor - Send actor message (TextureSelectById team_textures[(Picked Player)]) to main actor of unit (Last created unit)
          • Actor - Send actor message (TextureSelectById No Glow) to main actor of unit (Last created unit)
          • Actor - Send actor message (TextureSelectById Preserver_TeamColor) to main actor of unit (Last created unit)
          • Actor - Send actor message "SetTintColor {255,255,255 2.000000}" to main actor of unit (Last created unit)
 

DonMushroom

Member
Reaction score
4
I think im in over my head. This is my first map and the preserver thin is pretty much all its needs to be complete :(

I cant get my head around the process your teaching me as this is the first time i have tried anything like this. I dont see why there has to be so may preservers made with so many colors.

My map runs like a normal melee game really. Can someone write me a custom script so if the player chooses to be Protoss there preservers are the same color as the player.

Sorry about this. :(

(Preserver is the starting unit on my map if your protoss)
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Okay, I'll do a more detailed explanation.

First of all, you need a global variable of the type "- Game Link" and the Link type "Texture. Make it an array and set the size to something that fits all your players, like 12. I called my variable "PreserverTexture". First of all, you have to save all textures in that variable when the game starts. If you already have a trigger that runs when the map starts, you can add it to that one, otherwise you'll have to do a new one.

Trigger:
  • Initialize textures
    • Events
      • Game - Map initialization
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set PreserverTexture[1] = TeamColor_Player1
      • Variable - Set PreserverTexture[2] = TeamColor_Player2
      • Variable - Set PreserverTexture[3] = TeamColor_Player3
      • Variable - Set PreserverTexture[4] = TeamColor_Player4


Next up, you need a trigger to color the preservers when they enter the map.

Trigger:
  • Preserver Texture Change
    • Events
      • Unit - Any Unit Enters (Entire map)
    • Local Variables
    • Conditions
      • (Unit type of (Triggering unit)) == Preserver (A)
    • Actions
      • Actor - Send actor message (TextureSelectById PreserverTexture[(Triggering player)]) to main actor of unit (Triggering unit) ****
      • Actor - Send actor message (TextureSelectById No Glow) to main actor of unit (Triggering unit)
      • Actor - Send actor message (TextureSelectById Preserver_TeamColor) to main actor of unit (Triggering unit)
      • Actor - Send actor message "SetTintColor {255,255,255 2.000000}" to main actor of unit (Triggering unit)


**** Note that to send that message, when you select the message, switch from value to function and find "Texture Select By ID". You should then get a Texture parameter below it that you can set to your variable.
 

Kyuft

Member
Reaction score
11
If the glow is a texture, couldn't he have just edited the texture and made the blue, white, and colored white to alpha?

-Kyuft:shades:
 

DonMushroom

Member
Reaction score
4
Ok so all the triggers work :D Thanks you. How would i go about editing them so they are the color the player chooses instead of having a color preset for each player number?) :)
 

Kyuft

Member
Reaction score
11
Most likely, you will use a lot of If player color is...'s in the triggers, but it could work. However, I still believe you could change the texture so it does that automatically.

-Kyuft:shades:
 

Kyuft

Member
Reaction score
11
I am almost positive that there is a "Player color =" field that you caan input under an 'If' statement. You could do something like:
Trigger:
  • If
    • Player Color = Red
    • Then
      • Set preservercolor preserverred


-Kyuft:shades:
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
If the glow is a texture, couldn't he have just edited the texture and made the blue, white, and colored white to alpha?

-Kyuft:shades:
I'm not sure I'm following what you're saying. If you made the preserver have a transparent glow, he wouldn't have any color at all. As far as I know, there is no hidden team color underneath the glow. Kueken531 already modified the textures however to give them a player colored glow.

Ok so all the triggers work :D Thanks you. How would i go about editing them so they are the color the player chooses instead of having a color preset for each player number?) :)

It depends on how you want the player to choose their color. Basically have an integer array that saves the color a person wants. So a player gets to choose between colors 1-12. The number of the color he chooses is saved in the array at his index(at index 1 for player, index 2 for player 2).

You can then use the exact same triggers, you just have to change "(Triggering Player)" in the first action to YourIntegerArray[(Triggering Player)]. So it's "Actor - Send actor message (TextureSelectById PreserverTexture[YourIntegerArray[(Triggering player)]]) to main actor of unit (Triggering unit)"
 

Kyuft

Member
Reaction score
11
I'm not sure I'm following what you're saying. If you made the preserver have a transparent glow, he wouldn't have any color at all. As far as I know, there is no hidden team color underneath the glow. Kueken531 already modified the textures however to give them a player colored glow.

If you make set the glow to alpha (transparent) then the editor automatically fills that in with team color. If you look at the textures of units, they have transparent areas where their team color goes.

-Kyuft:shades:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top