ZippyDSMlee Posted July 10, 2015 Share Posted July 10, 2015 (edited) This is confusing the compiler and won't give me a error message to work with, I can hit save but it dose not save and when I leave the script box it refuses to save it. BTW is there a FO3 version of iState? What I want to do is summon an activator to run a script to fire a weapon then remove the activator. EDITGot it to save was not looking at the script type box it kept changing to effect for some reason , anyway the script is not working, not firing the weapon.... editI changed the istate script around but it still dose not work.edit =============== third or 100rth edit , fire weapon works but markfordelete dose not..... ScriptName zippyDGLPRIMARYscript short iState float fTimer short doOnce Begin GameMode set fTimer to fTimer + GetSecondsPassed set fTimer to 1 set iState to 1 if doOnce != 1 set doOnce to 1 if iState if (fTimer >= 1) && (iState == 1) Fireweapon WeapzippyDGLDUMMYSEC set iState to 2 set fTimer to 2 elseif (fTimer >= 2) && (iState == 2) set iState to 3 set fTimer to 3 elseif (fTimer >= 3) && (iState == 3) Markfordelete ZippyActivatorPRIMARYdgl set iState to 0 endif endif endif end =============== Edited July 11, 2015 by ZippyDSMlee Link to comment Share on other sites More sharing options...
Ghostifish Posted July 11, 2015 Share Posted July 11, 2015 (edited) markfordelete only works on disabled refs acording to geck pages. Not sure about those conditionals tho... doesn't look like anything past the "set fTimer to 2" line is ever executed because at the (re)start of execution istate and ftimer are reset to 1. Edited July 11, 2015 by Ghostifish Link to comment Share on other sites More sharing options...
ZippyDSMlee Posted July 11, 2015 Author Share Posted July 11, 2015 Begin GameMode set fTimer to fTimer + GetSecondsPassed <- this line is redundant. set fTimer to 1 <- because of this one. fTimer is always set to 1 set iState to 1 if doOnce != 1 <- doOnce variable never referenced anywhere else... set doOnce to 1 if iState <-reduntant. always true as is always preceded by set iState to 1 line above if (fTimer >= 1) && (iState == 1) <-this is the ONLY conditional that is ever true because of above code. Code will then jump to second endif and end Fireweapon WeapzippyDGLDUMMYSEC set iState to 2 <-does nothing. next loop through code will set fTimer and iState to 1 again. set fTimer to 2 elseif (fTimer >= 2) && (iState == 2) <- never reached because above condition is always true set iState to 3 <- same as previous AND will never be reached. set fTimer to 3 elseif (fTimer >= 3) && (iState == 3) <- see above. Markfordelete ZippyActivatorPRIMARYdgl < markfordelete only works on disabled references. disable activator first, then markfordelete set iState to 0 <-but istate is always 1 at the start of if conditionals, AND this line is NEVER reached endif endif endif endThank you! Ouch no wonder it won't work. I also just learned during this last rebuild of the cluster grenades I set destruction data up so it handles removal, seems to work and dose not linger in a quick save I thought a nif was bad or something...uhg. I see it was trying to run code after it was disabled and removed....no wonder nothing wanted to work.......*sigh* Damnit I blame the squirrels! >< I just do not have the nack for grammar >< Oh well I will trudge onward! Now to a slightly different thing. I've been told I might can reduce lag if I script out enchantments instead of placing them all in one enchantment. Would firing off an enchantment once every second for 4 seconds work ? There are 4 enchantments an FX, reduce speed, reduce damage resistance, frost damage. Link to comment Share on other sites More sharing options...
ZippyDSMlee Posted July 11, 2015 Author Share Posted July 11, 2015 well I jsut found a bug, the activator removes itself from the game but when you save and come back after turning the game off not using quick load it's like the activator comes back and endlessly spams grenades..... *sigh* I guess I will put this on the back burner.... Link to comment Share on other sites More sharing options...
ZippyDSMlee Posted July 11, 2015 Author Share Posted July 11, 2015 Disable fixed the problem of it fireweapon popping up in save games ,ect ScriptName zippyDGLPRIMARYscript float fTimer short doOnce Begin GameMode if (fTimer >= 0.0) if doOnce == 0 Fireweapon WeapzippyDGLDUMMYPRIMARY disable set doOnce to 1 elseif (fTimer >= 0.3) markfordelete ZippyActivatorPRIMARYdgl endif endif end Link to comment Share on other sites More sharing options...
Recommended Posts