Model issues

DonMushroom

Member
Reaction score
4
I am looking to morph/switch model of a unit at the end up a upgrade on top of the upgrade itself.

So for example if i have a few zerglings out and a roach. When i get the zergling speed upgrade the zerglings upgrade as normal and the roachs model morphs/cwitches into a queen but stays a roach in all other aspects. :)

Oh and how to change there portrait at the same time :)
 

Dave312

Censored for your safe viewing
Reaction score
269
You need to use actor events to change the model. You need to add 3 actor events: one which upgrades all existing units to the new model when the upgrade is completed; one which upgrades units to the new model when the unit is trained/created if the upgrade has been completed; and the last one changes the units death model if the upgrade has been completed.
Code:
Upgrade.<Your_Upgrade>.Add
   ModelSwap <Upgraded_Model>

ActorCreation
   ValidateUnit <Unit_Upgraded>
   ModelSwap <Upgraded_Model>

UnitDeathCustomize
   ValidateUnit <Unit_Upgraded>
   DeathCustomized Upgrade

<Upgraded_Model> is the new model that you want to be used for the unit.
<Unit_Upgraded> is a validator which checks if the player has researched the upgrade.

In the last event, the action is DeathCustomize Upgrade. In order to get this to work, you need to add a new customized death to the unit and call it upgrade. To do this, go to the Actor for the unit and open up the Combat: Custom Death +. Add a new index to the box at the top and set the Model value to the death model for your new unit model and set the Name value to type Custom and string Upgrade.

Look at the actor events for when the zergling unit is upgraded if you want a reference.


You should be able to use a similar process to also upgrade the portrait as well:
Code:
UnitPortrait.*.Customize
   ValidateUnit <Unit_Upgraded>
   PortraitCustomize <Upgraded_Portrait> _Unit


Let me know if you need further assistance or if I have glossed over something you don't understand.
 

DonMushroom

Member
Reaction score
4
I have tried everything i can think of. :(

I just cant get the portrait to change at the end of the upgrade. I have tried using Upgrade effects, Tried using Actor event effects and i just cant seem to get it to change.

Has anyone tried changing a portrait at the end of a upgrade before?
 

Dave312

Censored for your safe viewing
Reaction score
269
Sorry it has taken me so long to get back to you about this. I have meaning meaning to look into this further but haven't had a chance/forgotten about it until now.

There was a minor error in the event that I posted for the customized portrait. When setting the portrait, you want to leave the Actor parameter blank. It should now look like this:
Code:
UnitPortrait.*.Customize
   ValidateUnit <Unit_Upgraded>
   PortraitCustomize <Upgraded_Portrait>
 

Dave312

Censored for your safe viewing
Reaction score
269
Is the event exactly the same as what I posted? What happens if you delete the Term (the middle line)?

I have tested what I posted so I know it works.
 

DonMushroom

Member
Reaction score
4
If i delete the Term it changes from the start so that bit works. :)

The term is the same as the model swap though and that works perfectly. So why would it not be working? :(
 

Dave312

Censored for your safe viewing
Reaction score
269
That is a good question, but it has to be the Term that is causing it. My suggestion is to try playing around with it. Change which validator you are using (try Life > 3/4 HP and see what happens). Unfortunately I can't replicate your problem so I don't know what else I can tell you to do.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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