Difference between revisions of "Talk:GetParentCell"

Jump to navigation Jump to search
1,148 bytes added ,  04:05, 18 August 2006
cellchange alternatives...
imported>DragoonWraith
(ok, I see the complaint (requires a global script), but still, it's damn close)
imported>JOG
(cellchange alternatives...)
End
 
As I wrote above, usually you want to know when the player enters a specific cell. This can be accomplished with a global script and getincell just the same
 
scn GetinMycell
short within
begin Gamemode
if Getincell Mycell != within
set within to getincell mycell
if within
message "Another Visitor, stay a while, stay forever..."
endif
endif
end
 
Same for leaving, and entering any Interior-Cell can be recognized the same way, using [[IsInInterior]]
 
The only Advantage of GetParentCell for CellChange purposes is that it works when you enter another exterior cell, but you rarely have to test for this, when we did in Morrowind, only to avoid a FPS-lag due to constantly calling getdistance, you can now avoid this lag by testing on getdistance in the global script.
 
 
 
With cellchanged you would require just a local script on an object in the cell:
 
scn GetinMycell
begin gamemode
if cellchanged
message "Another Visitor, stay a while, stay forever..."
endif
end
 
Or even better:
 
scn GetinMycell
Beging OnCellChange
message "Another Visitor, stay a while, stay forever..."
end
Anonymous user

Navigation menu