Jump to content

simple script reset question


Relevant Halo

Recommended Posts

Hi,

 

I wrote a script that runs on startup that has an array of objects

I have since added more objects to the script via the scripting tab on creation kit.

 

However because arrays are immutable, the script does not use the new objects. (works fine in a new game). 

 

Using the restartscript command didn't seem to work. Is there another way to restart the script?

Link to comment

Why not empty / reset the array?

 

 

Example:

 

Function resetArray()
int i=0
 
While i < myArray.Length
myArray=none
i +=1
endWhile
 
endFunction
 
 
 

Then the index count should be reset.
The index count is probably global and is incremented in your function that fills your array.

 

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