Jump to content

Set a delay for an OnInit script?


Sepherose

Recommended Posts

Let me start by saying that I am not a scripter, someone else was awesome enough to hand me the script I need for my mod, but I have found a problem with the current indev version of said mod:

 

The dragons draw on an outfit list, their appearance is actually an armor. So basic dragons/frost dragons/blood dragons etc all utilize armors to have the different meshes applied to them. This is awesome, since I can make variant textures and then make a leveled list that has the original skin armor and my variations of it in there, then put the leveled list in the outfit list and viola! I have more dragon variants!

 

It is not awesome because as far as I can tell, the leveled list is determined AFTER the tintmasking selection/application script from my mod is being applied, which breaks the functionality.

 

I was wondering if there was a way I could delay the script for tintmasking until after the dragon has spawned in with the armor item in it's inventory, that way the tintmasking is properly applied to it.

 

As stated, the script is an OnInit script, so I don't know if that is possible or not. Would it be better to instead have the script applied to the armor items themselves instead of extending the dragonactorSCRIPT and on the dragons? Or.....?

 

This is all drawing from teh NIOverride portion of RaceMenu by the way. It's armor tinting function. Any scripters have knowledge that could help me? I would ask the person that originally wrote the script, but I already feel bad enough with the amount of help they already generously gave me. :/

Link to comment
I was wondering if there was a way I could delay the script for tintmasking until after the dragon has spawned in with the armor item in it's inventory, that way the tintmasking is properly applied to it.

Assuming that your script is attached to actor, you could move everything from OnInit event to OnLoad event (you could basically rename OnInit to OnLoad, if you are not using it for something else).

 

Its hard to tell anything else without seeing the actual script or some working similar example.

Link to comment
Guest IAmTheOneWhoKnocks

Oh... hey, I hadn't thought of that, but I had looked at it. The delay seems to have helped, but only partially. Later I'll test the OnLoad instead and see if that fixes it.

 

Okay, hope we've helped solve your problem.  :)

If you have any more problems just tell us. I would also recommend looking at http://www.creationkit.com/ if you want to learn scripting. They have lots of good examples and tutorials.

Link to comment
Guest IAmTheOneWhoKnocks

Alright! So I got it fixed! As it turns out there was already an OnLoad event in the script, and I had added the wait into the wrong place. I moved it and now it's all firing like it should. you guys helped out a great deal, thank you very much!

 

No bother, happy to help.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use