📧 Message Board Archive

Scripting help
I was just wondering if anyone has thought of an easier way to do this.or if some things I'm thinking of are possible  I'm going to have the darkness and lantern/torch thing that's been done before, only I'm going to have it so when you use a torch, or equip the lantern, the black sprite goes to the frame with gaps in it So, are any of these possible?



To create a sprite and give it an editor number?

To check all sprites on the screen for any of a certain seq  (eaily!)



I had more.but anyway, I'm thinking that using a torch could spawn a script that sets a global and after a certain time sets it back, then the darkness sprites could be constantly checking for the global or for the lantern to be equipped or maybe just in inv, haven't decided which yet.  This would workpretty good I guess but still, can anyone think of a better way to do it?

Re: Scripting help
So, you would create the darkness and assign it to a global, then change the seq on that global?  Sounds good to me.
Re: Scripting help
: So, you would create the darkness and assign it to a global, then change the seq on that global? Sounds good to me.



Ya..i could do that, but then the script on the darkness would be running a loop constantly checking if the global is 1 or 0...this isn't terrible, especialy since my dmod already has 3 scripts running like that at all times..hehe...it'll be hell for old computers...ah well..



another way i could do it would be to have all the darkness sprites be sprite #1, then when you use a torch it checks the frame and seq of sprite #1, and if it matches, change it, but i think the first idea would be easier, and would work with the lantern idea better...



Re: Scripting help
: : So, you would create the darkness and assign it to a global, then change the seq on that global? Sounds good to me.



: Ya..i could do that, but then the script on the darkness would be running a loop constantly checking if the global is 1 or 0...this isn't terrible, especialy since my dmod already has 3 scripts running like that at all times..hehe...it'll be hell for old computers...ah well..



: another way i could do it would be to have all the darkness sprites be sprite #1, then when you use a torch it checks the frame and seq of sprite #1, and if it matches, change it, but i think the first idea would be easier, and would work with the lantern idea better...



Not a clue as to how to do this better.