Jump to content

Scaling objects in real time.


Recommended Posts

Darkfox did a video about this but the script seems to be gone now,. Here's the question.

I want to scale an object say from 0.1 > 1.0 in real time i.e. player watches it get bigger.

I don't see how TranslateTo would achieve this, I may be wrong, so maybe somehow using SetScale and ModScale?

Ideas please.

Link to comment
Share on other sites

"ModScale" is a console command.


You need to use "SetScale", but if you haven't read the web page, there are some problems with this function.



- Using SetScale() doesn't change an object reference's collision information. Collision will continue to occur with the reference as if it were its original size.


If i were you i would stay away from this function since i have discovered that except from what the 'creationkit' page says.

- Calling this function repeatedly over a short span of time may cause a crash to desktop.

It will cause random CTDs even if the function is called only once (especially when it's use on a actor), in my tests i had 50% CTDs everytime this function was called, so at 10 test runs 5 of them would CTD.

Link to comment
Share on other sites

maxarturo, I have not noticed ctd's using this function. My mod Creature Size Variants uses set scale on actors all the time, and I haven't noticed ctd problems with it. My new positioner mod also does what antstubell describes, and again I haven't noticed ctd issues. Anyway, the script function I use is:

 

Function ScaleUp()
    While Input.IsKeyPressed(upHK) && Ref.GetScale() < 2
        Ref.SetScale((Ref.GetScale() + 0.01))
    EndWhile
EndFunction 

Function ScaleDown()
    While Input.IsKeyPressed(DownHK) && Ref.GetScale() > 0.05
        Ref.SetScale((Ref.GetScale() - 0.01))
    EndWhile
EndFunction

Change the while conditions to suit your needs.

Link to comment
Share on other sites

@ dylbill & antstubell


Those tests were made some time ago, and i did forgot to mention (i just remembered while reading dylbill post) that i was testing on a custom made actor/mesh that after a lot of issues that i had encounter while setting up that particular scene/ambush, in the end it turned out to be that the issue was that the actor/mesh was BUGGED !.


So sorry antstubell for my incorrect answer, although after that i didn't use/test that function again, so i don't know...


I would use dylbill suggestion and knowledge on the matter.

Link to comment
Share on other sites

@ dylbill


That wouldn't work right with the idea i had since the actor was supposed to be HUGE, you would only be able to see and fight him from the waist up, and it would be way too noticeable, especially since i wanted to be clean, with no VFXs.


I was thinking to go back and redo it, but since the collision issue can't be resolved directly, then i guess there is no point in trying...


Thanks.

Link to comment
Share on other sites

You could, first scale the actor up use the function I posted, then after it's done scaling, disable and replace with an actor that's the same size. It would cause the actor to blink, but I think that's the closest you're likely to get.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...