rausheim Posted July 2, 2011 Share Posted July 2, 2011 Ah yes, forgot that it was float. Regarding a "move the object around" script, there is one at the Geck/CS's tutorial pages at Bethesda, but can't find it now cos the search functions has gone wonky. It requires you to have script extender cos ur going to be hitting a button when releasing it. Link to comment Share on other sites More sharing options...
AlexxEG Posted July 2, 2011 Share Posted July 2, 2011 You should add MarkForDelete AFTER Disable in order to completely delete the reference. scn 0MCWoodHarvestScript Begin OnHitWith 0WeapAxeIron Player.AddItem mcblockwood 1 Disable MarkForDelete End Link to comment Share on other sites More sharing options...
AlexxEG Posted July 2, 2011 Share Posted July 2, 2011 (edited) I created this script that should make the player have to hit the block 3 times (iHealth) within 2 seconds of each hit. If it goes past 2 seconds, it will reset.I don't have FO3 installed on this computer so I can't test it myself, but you can try if you want. scn 0MCWoodHarvestScript int iHealth int iDoOnce int iStage float fTimer Begin OnHitWith 0WeapAxeIron if ( iHealth == 0 ) Player.AddItem mcblockwood 1 Disable MarkForDelete else Set fTimer to 2 Set iStage to 1 Set iHealth to iHealth - 1 endif End Begin GameMode if ( iDoOnce == 0 ) Set iHealth to 3 Set iDoOnce to 1 endif if ( fTimer > 0 ) Set fTimer to fTimer - GetSecondsPassed elseif ( iStage == 1 ) Set iStage to 0 Set fTimer to 0 endif End Edited July 2, 2011 by Alexx378 Link to comment Share on other sites More sharing options...
KDStudios Posted July 2, 2011 Author Share Posted July 2, 2011 Thanks for all your help Rausheim!Really means a lot :)The script works perfectly!The only problems I had was that it's X and Y co ordinates were always lob sided but I countered that by adding them to the float too.Now the way the block is placed depends on where the player view is aimed at. Looking directly ahead will place the block PERFECTLY (at least very very close)Another problem I have it... I kinda get stuck in the block :P But jumping managed to get me out of it.Is there a way I could activate "tcl" for one second upon dropping? Just so I can get free? @Alexx378Thanks for the heads up about MarkForDelete, I included that into the script and it works fine :) That script you made for multiple hits was very generous of you! I can't believe the amount of help you and Rausheim are giving me.You guys are the best! I'll try adding it in now and tell you the results when I get them :)Again thanks! Link to comment Share on other sites More sharing options...
AlexxEG Posted July 2, 2011 Share Posted July 2, 2011 Okey, NOW I think it's complete. Link to comment Share on other sites More sharing options...
KDStudios Posted July 2, 2011 Author Share Posted July 2, 2011 Okay so I tested that script ingame. The script just before you edited this one worked great.It took 3 hits to destroy the blockBut the timer didn't seem to reset at any time.If I hit one block and left it for about a minute then hit it 2 more times it was destroyed, instead of it taking 3 hits. The script currently works great took.It takes 4 hits to destroy the blockBut like the previous script the timer doesn't reset. But in all honesty it's no biggy.The fact it takes 3 hits to destroy a block has already made me speechless! But yeah thanks to you the blocks disappear properly and now take a few hits to destroyand thanks to Rausheim the blocks can now be placed back into the world!Here's an image of that http://img810.imageshack.us/img810/1489/screenshot16uo.jpg Link to comment Share on other sites More sharing options...
AlexxEG Posted July 2, 2011 Share Posted July 2, 2011 (edited) Hmm... I never been good with timers. I will see what I can do when I get access to FO3 again. :) But it may be a while. If you change "if ( iHealth == 0 )" --> "if ( iHealth == 1 )" it will take 3 hits again. Edited July 2, 2011 by Alexx378 Link to comment Share on other sites More sharing options...
KDStudios Posted July 2, 2011 Author Share Posted July 2, 2011 I really appreciate what you've done already.I'm in no rush to get Falloutcraft complete anyway, everytime I rush things I tend to make mistakes.But any help you or anyone else can provide is always welcome, for this I will definitely be including you both into the credits section when I've released this version. Yeah I noticed the differences, I think I'll stick with 4 for now.I'll decide later which I want :) Again, thanks a lot. Just need to figure out how to get out of the block I place without the need to jump :) Link to comment Share on other sites More sharing options...
TheTalkieToaster Posted July 2, 2011 Share Posted July 2, 2011 (edited) if ( iDoOnce == 0 ) Set iHealth to 3 Set iDoOnce to 1 endifWhy have you got a if(iDoOnce) running every frame when you could've easily had the health count up from 0->3 instead?E: It's not even an optimal if, that'd be if(iDoOnce), else. Edited July 2, 2011 by TheTalkieToaster Link to comment Share on other sites More sharing options...
KDStudios Posted July 2, 2011 Author Share Posted July 2, 2011 if ( iDoOnce == 0 ) Set iHealth to 3 Set iDoOnce to 1 endifWhy have you got a if(iDoOnce) running every frame when you could've easily had the health count up from 0->3 instead?E: It's not even an optimal if, that'd be if(iDoOnce), else. Hmm so what would you suggest I change in the script then?I'm open to any and all opinions and suggestions.Even optimisations :) AlsoI'd just like to point out I have over 2050 blocks with that script attached in a cell with absolutely no issues or any change to my framerate :) Link to comment Share on other sites More sharing options...
Recommended Posts