Vagrant0 Posted April 12, 2008 Share Posted April 12, 2008 I need help with the code to change/replace a static into the position of another static (removed). Would I need OBSE or is there a basic code structure for this procedure?Statics cannot have scripts running on them. Without knowing more about what you're trying to do, I can't suggest much beyond that. But in all liklihood OBSE is neither useful, nor necessary. Again, would need to know more to tell you one way or another. Are both the statics, and the locations a constant, meaning that you won't be trying to do anything outside that specific case, or are you trying to make it apply to a wider range of static objects/locations? Is it something like moving a statue from one corner of the room to the other? Or are you wanting to relocate whatever static you're looking at to a location which doesn't remain constant? Link to comment Share on other sites More sharing options...
Aoikani Posted April 12, 2008 Author Share Posted April 12, 2008 I need help with the code to change/replace a static into the position of another static (removed). Would I need OBSE or is there a basic code structure for this procedure?Statics cannot have scripts running on them. Without knowing more about what you're trying to do, I can't suggest much beyond that. But in all liklihood OBSE is neither useful, nor necessary. Again, would need to know more to tell you one way or another. Are both the statics, and the locations a constant, meaning that you won't be trying to do anything outside that specific case, or are you trying to make it apply to a wider range of static objects/locations? Is it something like moving a statue from one corner of the room to the other? Or are you wanting to relocate whatever static you're looking at to a location which doesn't remain constant? Actually, the code wouldn't be placed on the static. It would be in an activator. I'm wondering that upon triggering the activator, is it possible to script a removal of a static at x,y,z and replace it with another static? Case such as a persistent static:plant called <name> and then replace with a new static:plant called <new name>. It wouldn't be a global change, only a local specifically target I guess. Link to comment Share on other sites More sharing options...
Vagrant0 Posted April 12, 2008 Share Posted April 12, 2008 Then all you would need would be to place all the plants you want at the specified location, give them a name, make them a persistant reference, initially disabled. Then use the activator to enable one, and disable the others depending on the number of times pressed. OBSE would neither be useful, nor needed. Link to comment Share on other sites More sharing options...
Aoikani Posted April 12, 2008 Author Share Posted April 12, 2008 Then all you would need would be to place all the plants you want at the specified location, give them a name, make them a persistant reference, initially disabled. Then use the activator to enable one, and disable the others depending on the number of times pressed. OBSE would neither be useful, nor needed.Well, what you're saying is I must click on the static to change it? Or by just walking close proximity to the static (within the trigger zone) the script could activate the disabling? ^ ^ Link to comment Share on other sites More sharing options...
Aoikani Posted April 12, 2008 Author Share Posted April 12, 2008 let me explain what I am trying to do. By walking through a trigger zone, an activator would trigger a sound ID and trigger the exchanging of two ID's at location X. I don't want to just click on the static to begin the trigger. I want the trigger to activate it. AND... while in the trigger zone, while the audibles and exchanging are activating within the loop I have, I want to be able to alternate the "enabling and disabling" within the loop until the zone is exited. edited:here is a message I left at another website to explain better. I've noticed that here in the forums there are some very talented script writers and decided to ask for some help on handling statics. I know you can't write scripts and attach to statics, however activators/triggers can be script directed and then attached to statics. So my questsion is, "Is it possible to replace a static with another static?" In other words, can I replace a persistent static at x,y,z location WITH another static, and then replaced it back again with the original static? I'm writing a large mod Tamriels Underverse and came to a stumbling block on a script I am working on. I can't figure it out. I'm trying to alternate a specific static with another similar in looks to make it appear as though their is an animation. Kind of like flip/card animation. Is this possible? I am trying to keep it from being complicated and other than what i've described, no other effects are wanting. Presently I have a script attached to a trigger/zone activator that attach's a script to provide audible's. So is there a command to replace statics? Link to comment Share on other sites More sharing options...
Xeniorn Posted April 13, 2008 Share Posted April 13, 2008 I'm just wondering, why not make it a real animation, with static changing its x,y and z coordinates in time? Link to comment Share on other sites More sharing options...
Vagrant0 Posted April 13, 2008 Share Posted April 13, 2008 let me explain what I am trying to do. By walking through a trigger zone, an activator would trigger a sound ID and trigger the exchanging of two ID's at location X. I don't want to just click on the static to begin the trigger. I want the trigger to activate it. AND... while in the trigger zone, while the audibles and exchanging are activating within the loop I have, I want to be able to alternate the "enabling and disabling" within the loop until the zone is exited. edited:here is a message I left at another website to explain better. I've noticed that here in the forums there are some very talented script writers and decided to ask for some help on handling statics. I know you can't write scripts and attach to statics, however activators/triggers can be script directed and then attached to statics. So my questsion is, "Is it possible to replace a static with another static?" In other words, can I replace a persistent static at x,y,z location WITH another static, and then replaced it back again with the original static? I'm writing a large mod Tamriels Underverse and came to a stumbling block on a script I am working on. I can't figure it out. I'm trying to alternate a specific static with another similar in looks to make it appear as though their is an animation. Kind of like flip/card animation. Is this possible? I am trying to keep it from being complicated and other than what i've described, no other effects are wanting. Presently I have a script attached to a trigger/zone activator that attach's a script to provide audible's. So is there a command to replace statics?trying to make it work like that probably isn't advisable. Any sort of scripting based flipping would be too dependant on the speed of the computer being used. Every time a model is being shown, and then hidden, the game has to load the data for that model, then unload it. This is true for both a sequenced enabling/disabling* as well as any sort of OBSE function which changes meshes (which is probably what answer you would get there). Since you are essentially trying to animate an object, you're really only left with the option of animating that object. Unfortunately this is not something which most people can do, so you should probably sit down and really think of how necessary this sort of thing is within your mod. *By sequenced enabling/disabling, I mean something likeshort counter short trigger begin gamemode if trigger == 1 if counter == 1 ref1.disable ref2.enable elseif counter == 2 ref2.disable ref3.enable elseif counter == 3 ref3.disable ref4.enable elseif counter == 4 ref4.disable ref5.enable elseif counter == 5 ref5.disable ref6.enable elseif counter == 6 ref6.disable ref1.enable set counter to -1 endif set counter to counter + 1 endif end Where ref# is the named reference of each plant. With all the plant references placed at the exact same location. "trigger" can be set remotely from a wide range of things. But again, this method isn't advised since it will probably kill any sort of performance, and may still not give you the effect you are wanting. The OBSE method may actually be worse since you'd be constantly re-defining the mesh paths, which would not be able to make use of memory once each one was initially loaded. Link to comment Share on other sites More sharing options...
Aoikani Posted April 13, 2008 Author Share Posted April 13, 2008 Thanks for your tip, you're probably right about the memory eating or FPS drop. I'll still give it a try though. I'm not really trying to change out a lot of statics, only one in a local area. But I do have a low vidcard that I use, it's only a Nvidia 6100. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.