Sgt_Wilson 0 Posted May 27, 2003 Can I update a global variable defined in one script, from within another script? ------------------- CallingScript.sqs GlobalList = [1,22,3] [] exec "Update.sqs" hint Format["%1",GlobalList select 1] ------------------- Update.sqs GlobalList set [1,2] Exit ------------------- I cant get this to work, the new value added to GlobalList array only shows up from within the UpDate.sqs script. Cheers P.S I did try and search through the old post, to no avail. Share this post Link to post Share on other sites
Guest jacobaby Posted May 27, 2003 have you tried a pause after exec'ing the update sqs, for a second or so? I think the hint is exec'd before the new array value can be set. you CAN have a global array, if you want it broadcast for MP games you have to do that too. TJ Share this post Link to post Share on other sites
Sgt_Wilson 0 Posted May 27, 2003 Yes, thanks. That did the trick, I managed to get it down to something silly like 0.0001. Share this post Link to post Share on other sites
Guest jacobaby Posted May 27, 2003 if you want it to work in MP you have to allow for the broadcasting, so use an @ to wait unti the array is changed Share this post Link to post Share on other sites