betto212 Posted February 6, 2012 Share Posted February 6, 2012 i need to create a permanent reference to use this script ,how to do this ? if someone can help if cellChecker.getInSameCell player == 0 cellChecker.moveTo player ; do somethingendif Link to comment Share on other sites More sharing options...
caramellcube Posted February 6, 2012 Share Posted February 6, 2012 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 More sharing options...
Gribbleshnibit8 Posted February 8, 2012 Share Posted February 8, 2012 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 endifThis 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 More sharing options...
betto212 Posted February 8, 2012 Author Share Posted February 8, 2012 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 endifThis 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 spacei found a solution : tested if gpcplayer != player.gpc set gpcplayer to player.gpc ;do something endif Link to comment Share on other sites More sharing options...
Recommended Posts