Jump to content

Recommended Posts

Posted (edited)

Hey... i create Small script for campfires

 

Script have to do:

1) Enable Fire Animation and Light

2) Wait random time

3) Disable Fire Animation and Light

 

it seems easy to do but my Script is not working :c...

Not working all time... it is working for first 2/3 activations but after 2/3 activations

Light show normaly but Fire Animation dont...

 

Maybe important to know, on Screen i have around 10/15 "campfires"

is that bad ? ;x... Skyrim can't support so many scripts at once???? lol???

 

 

Here is script that i use: ( and which i test )

 

  Reveal hidden contents

 

 

And Here is script that i think ill be using ( cause its less... bad :x... )

 

  Reveal hidden contents

 

 

 

 

Why after 2/3 Uses Fire Animation don't show?

im using vanilla Fire Animation from Movable Objets

 

//Edit:

can any1 change title to: "What is wrong with my script ? :) [10]"

[9] index is already in use xDDDDDD

Edited by TobiaszPL
Posted

10 ~ 15 campfires in one cell? I would say that there is a bit of lag going on there. By using the Wait function you are making each instance pause for that amount of time. While paused the script still takes up a processing thread and this will eventually lead to issues.

 

I recommend registering for either a single game time update or real time update.

RegisterForSingleUpdate paired with OnUpdate

RegisterForSingleUpdateGameTime paired with OnUpdateGameTime

Posted (edited)

Keep in mind there is a chance that a campfire will be detaching during the waittime, so we have to use the holder of sound instances as script variables.

 

You could use something like this:

QLG_SimpleCampfireScript

  Reveal hidden contents

 

Edited by ReDragon2013
Posted (edited)

IsharaMeradin

Ill try with OnUpdate but srsl... Games normaly can use up to 200/400 that small scripts at once...

It Just Works =_= egh...

 

  Reveal hidden contents

 

 

I never had so many problems with UE4 or Unity or my Own Engine ( Silent Dream Engine < whut a name :o )

CK is broken T_T how they even create wor.... ahh right... Skyrim is also not working fine :x... lel

 

 

 

ReDragon2013

You change Your write style or i learn already how to read your Code :tongue:

but your code is missing self.enable() / self.disable() << this line enable / disable trigger box that allow player to use script

 

How about this Code: ?

 

  Reveal hidden contents

 

I change it to OnUpdate like Ishara says

and i add OnCellDetach like ReDragon shows :x...

 

 

can't test it now :c...

Edited by TobiaszPL
  • Recently Browsing   0 members

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