Jump to content

CTD on MOD


Deleted2746547User

Recommended Posts

Well there are a couple things about this script that bother me still but here is a re-due for ya

 


scn BlackbriarOPNEST80ATTACK

float timer
int Primed

Begin OnActivate

   if (Player.GetItemCount WeapNVTimeBomb >= 1)
       player.RemoveItem WeapNVTimeBomb 1                   ; ingredient
       ShowMessage BlackbriarOPNEST80RUN                    ; message to leave area before boom
       set Timer to 5
       set Primed to 1
   endif
End

Begin GameMode

   if (Primed == 1)
       if (Timer > 0)
           set Timer to Timer - GetSecondsPassed                                ; check time <-timer will not run right in a on activate block
       else
           BlackbriarOPNEST80Explosion2Ref.PlaceAtMe VMS02FakeLargeExplosion    ; boom effect
           VMS02BlastedWall02REF.Enable                                         ; damaged wall
           VMS02Wall02REF.Disable; hide good wall
           BlackbriarOPNEST80ExplosionRef.Disable                               ; disable bomb activator
           ObjectREF.Disable
           ObjectREF.markfordelete <---------------what are you marking for delete
           set Primed to 0
       endif
   endifEnd

 

 

Many Many thanks for that but let me ask you a ? - - - > what don't you like about it and is there a better way? I mean, this was my Frankenstein cobbling together of bits and pieces from here and there.

Link to comment
Share on other sites

I wrote in the code i did not like look for the ARROWS. I like the script now just missing some things like on the MARKFORDELETE

 


scn BlackbriarOPNEST80ATTACK

float timer
int Primed

Begin OnActivate

if (Player.GetItemCount WeapNVTimeBomb >= 1)             ;===================================
	player.RemoveItem WeapNVTimeBomb 1               ; Ingredient
	ShowMessage BlackbriarOPNEST80RUN                ; Message to leave area before boom
	set Timer to 5                                   ; Set bomb timer
	set Primed to 1                                  ; Start timer
endif                                                    ;===================================
End

Begin GameMode

if (Primed == 1)                                                                     ;===============================================================
	if (Timer > 0)                                                               ;
		set Timer to Timer - GetSecondsPassed                                ; Check time <-timer will not run right in a on activate block
	else                                                                         ; block
		BlackbriarOPNEST80Explosion2Ref.PlaceAtMe VMS02FakeLargeExplosion    ; Boom effect
		VMS02BlastedWall02REF.Enable                                         ; Damaged wall
		VMS02Wall02REF.Disable                                               ; Hide good wall
		BlackbriarOPNEST80ExplosionRef.Disable                               ; Disable bomb activator
		ObjectREF.Disable                                                    ;
		ObjectREF.markfordelete                                              ;<--what are you marking for delete
		set Primed to 0                                                      ;===============================================================
	endif
endif
End

Edited by Capt Mitch
Link to comment
Share on other sites

I wrote in the code i did not like look for the ARROWS. I like the script now just missing some things like on the MARKFORDELETE

 


scn BlackbriarOPNEST80ATTACK

float timer
int Primed

Begin OnActivate

if (Player.GetItemCount WeapNVTimeBomb >= 1)             ;===================================
	player.RemoveItem WeapNVTimeBomb 1               ; Ingredient
	ShowMessage BlackbriarOPNEST80RUN                ; Message to leave area before boom
	set Timer to 5                                   ; Set bomb timer
	set Primed to 1                                  ; Start timer
endif                                                    ;===================================
End

Begin GameMode

if (Primed == 1)                                                                     ;===============================================================
	if (Timer > 0)                                                               ;
		set Timer to Timer - GetSecondsPassed                                ; Check time <-timer will not run right in a on activate block
	else                                                                         ; block
		BlackbriarOPNEST80Explosion2Ref.PlaceAtMe VMS02FakeLargeExplosion    ; Boom effect
		VMS02BlastedWall02REF.Enable                                         ; Damaged wall
		VMS02Wall02REF.Disable                                               ; Hide good wall
		BlackbriarOPNEST80ExplosionRef.Disable                               ; Disable bomb activator
		ObjectREF.Disable                                                    ;
		ObjectREF.markfordelete                                              ;<--what are you marking for delete
		set Primed to 0                                                      ;===============================================================
	endif
endif
End

 

:thumbsup: :thumbsup: :thumbsup:

 

The only reason I started doing the markfordelete was because I didn't want to be guilty of save game bloat or anything that might bog down people's (or my performance).

 

When you have time, I'd like to pick your brain on a couple of other issues I'm running into with scripts... to see if you have any ideas.

 

 

MANY MANY THANKS

Link to comment
Share on other sites

Doing the MARKFORDELETE is VERY smart and ALL moders should do it but you have to DISABLE first and you have to have a REF attached to it.

If you do not Disable it first then it does not delete it.

So be sure to replace ObjectREF with your reference your wanting to delete.

 

Whenever you want as i said im always around and check the forums all the time.

If im not on here im putting together the website for the mod im working on. Link in my Signature.

 

Better to start a new topic in the forum so others can learn from it also

Edited by Capt Mitch
Link to comment
Share on other sites

Doing the MARKFORDELETE is VERY smart and ALL moders should do it but you have to DISABLE first and you have to have a REF attached to it.

If you do not Disable it first then it does not delete it.

So be sure to replace ObjectREF with your reference your wanting to delete.

 

Whenever you want as i said im always around and check the forums all the time.

If im not on here im putting together the website for the mod im working on. Link in my Signature.

 

Better to start a new topic in the forum so others can learn from it also

 

 

A quick question then on that note: would you disable/mark for delete <most/if not all> references or scripts that will no longer be used or what is your rule of thumb for that?

Link to comment
Share on other sites

Doing the MARKFORDELETE is VERY smart and ALL moders should do it but you have to DISABLE first and you have to have a REF attached to it.

If you do not Disable it first then it does not delete it.

So be sure to replace ObjectREF with your reference your wanting to delete.

 

Whenever you want as i said im always around and check the forums all the time.

If im not on here im putting together the website for the mod im working on. Link in my Signature.

 

Better to start a new topic in the forum so others can learn from it also

 

 

A quick question then on that note: would you disable/mark for delete <most/if not all> references or scripts that will no longer be used or what is your rule of thumb for that?

If it is no longer going to be used yes. You are dead on when you said it will cause a bloated save file. This mainly happens with duplicated items that are deleted and not markedfordelete.

Link to comment
Share on other sites

Doing the MARKFORDELETE is VERY smart and ALL moders should do it but you have to DISABLE first and you have to have a REF attached to it.

If you do not Disable it first then it does not delete it.

So be sure to replace ObjectREF with your reference your wanting to delete.

 

Whenever you want as i said im always around and check the forums all the time.

If im not on here im putting together the website for the mod im working on. Link in my Signature.

 

Better to start a new topic in the forum so others can learn from it also

 

 

A quick question then on that note: would you disable/mark for delete <most/if not all> references or scripts that will no longer be used or what is your rule of thumb for that?

If it is no longer going to be used yes. You are dead on when you said it will cause a bloated save file. This mainly happens with duplicated items that are deleted and not markedfordelete.

 

OK, the EXPLOSION SCRIPT WORKS PERFECTLY. THANK YOU. I would have never been able to figure out what was wrong with my script.

 

I'm going to start another topic on the other items (so others can learn from it) but I do have a related question to the CTD issue.

 

Every once in a blue moon, I get a CTD when exiting/entering buildings on the grounds of NCRCF. This is where I "built" the main 'base' for the mod. It doesn't happen all the times, in the same buildings, and might only occur 1 in every 40 or so exits/enters...but it has been persistent. Any ideas on the cause or what I should look for? THANK YOU again.

Link to comment
Share on other sites

look for patterns and repeats, meaning if it is just one door, a certain area or when some action is being preformed. if can narrow it down or you can also use printc "type something here" and place this into your scripts to try to figure it. printc prints whatever is in the "" to the console
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...