Jump to content


Photo

Delay Model Change

delaymodel change smooth

Best Answer Miraak5, 10 June 2020 - 02:39 PM

Make it so it's an AttributeModifier that is giving the upgrade you need to change the model

so this is what you need in your attribute modifier

 

Upgrade = Upgrade_YourUpgrade Delay:1000

 

so this AttributeModifier will allow you to set a Delay for the upgrade that will trigger the model swap

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 OneV

OneV
  • Members
  • 53 posts

Posted 10 June 2020 - 02:17 PM

I added a unit that changes its model after purchasing an upgrade. The only problem that I have is that model changes too suddenly. I wanted to add an FX that would go on during the model transitioning. However, the model changes so quickly that the FX is useless. I am using the following code to change the model and attributes of the unit:

Behavior = AttributeModifierUpgrade ModuleTag_WargAttackBonus
TriggeredBy = Upgrade_TrueAlphaWarg;
AttributeModifier = TrueAlphaWargBonus
CustomAnimAndDuration   = AnimState:USER_2 AnimTime:0 TriggerTime:0 ;set flag forever
End
I tried changing the "TriggerTime" to 5000, but it does not work.

Does anyone have any ideas how to accomplish a delay to change the model?


#2 Miraak5

Miraak5

    title available

  • Members
  • 389 posts
  • Location:France
  • Projects:ROTWK Patch 2.02, Wars of the North, BFME1 1.08 Complete Edition
  •  BIG coding, Map scripting and AI coding

Posted 10 June 2020 - 02:39 PM   Best Answer

Make it so it's an AttributeModifier that is giving the upgrade you need to change the model

so this is what you need in your attribute modifier

 

Upgrade = Upgrade_YourUpgrade Delay:1000

 

so this AttributeModifier will allow you to set a Delay for the upgrade that will trigger the model swap


He was the first...


#3 OneV

OneV
  • Members
  • 53 posts

Posted 10 June 2020 - 04:05 PM

Make it so it's an AttributeModifier that is giving the upgrade you need to change the model

so this is what you need in your attribute modifier

 

Upgrade = Upgrade_YourUpgrade Delay:1000

 

so this AttributeModifier will allow you to set a Delay for the upgrade that will trigger the model swap

Thank you, Miraak, it works. A very elegant solution.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users