Jump to content

how to create a permanent reference


betto212

Recommended Posts

if cellChecker is a physical object, like an activator or static, double click it in the render window and there should be a check box near the bottom of it's properties window that says persistant reference, make sure that is checked and the object is named cellChecker. Also, make sure it's the reference you're dealing with, not the base object.
Link to comment
Share on other sites

A better solution might also be to have the script read something like:

ref self

set self to GetSelf			;this will set a variable to the reference the script is on
if self.getInSameCell player == 0 
	self.moveTo player 
	; do something
endif

This would allow you to use multiple of the object if you so desire. If you're using FOSE, you can also get the base object via script, and then the same script could be used on multiple objects with different effects. But I like keeping as few scripts as possible in my mods.

 

The above code should work, I can't test it ATM.

Link to comment
Share on other sites

A better solution might also be to have the script read something like:

ref self

set self to GetSelf			;this will set a variable to the reference the script is on
if self.getInSameCell player == 0 
	self.moveTo player 
	; do something
endif

This would allow you to use multiple of the object if you so desire. If you're using FOSE, you can also get the base object via script, and then the same script could be used on multiple objects with different effects. But I like keeping as few scripts as possible in my mods.

 

The above code should work, I can't test it ATM.

 

thanks i was trying to do a script that test if player chaged world space

i found a solution : tested

 

if gpcplayer != player.gpc

set gpcplayer to player.gpc

;do something

endif

Link to comment
Share on other sites

  • Recently Browsing   0 members

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