[QUOTE=alspal] Setting 22 values in an event doesn't sound like it would cause lag, how many bullets do you need to make per tick? Maybe you need to optimise other parts of your code?[/QUOTE]
it doesn't cause much lag if i'm using a simple weapon such as a pistol or a rifle, but if i use a rapid fire multiple shot weapon, it might have to assign 4 * 22 PVs every other other frame, which does build up and cause lag.
[QUOTE=newt] Once a pv is changed in a layout there's no way to remember what its original value was.
What you could do is use global variables, or better yet the hash, or ini object to store the original values.
22 pv's is a lot to deal with all the time, you might consider a different approach by grouping variable types by common use.
For example, an apple can have many different variables, red, green, sweet, tart, etc. But you dont just say I want a red apple, you call it by name IE Red Delicious, or Granny Smith.
Now to use that in say something like an ini you would name a bullet as an ini group, and then if the bullets name/ group is used you can get its variables using for each item in group. [/QUOTE]
I'm not trying to reset each PV to its original value, but rather trying to change the value that the PV starts as when the object containing the PV is created, I'm just wondering if there is a way I could do this because I already have all the PVs created and etc. It would just be annoying to start my whole weapon system over and use .ini files. Although it is an absolutely genius idea and I would have never thought of it, not to mention I'm trying to use mainly outside files for in-game content such as maps, animations, etc. And If I used your .ini file weapon system idea I could potentially save previously generated weapons for future reference which I guess would be nice.
Thanks for the help! :D