Difference between revisions of "Talk:IsPlayerMovingIntoNewSpace"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(alright, how exactly would I do that?)
imported>Nezroy
(mentioning the related OnLoad problem)
 
Line 14: Line 14:


::::OK, (far) more complicated than I wanted, but conceivable... you could use [[GetInSameCell]] with that. Definitely would have preferred to keep the activator in the script (i.e. set refVar to PlaceAtMe activator 1 0 0, refVar.Cast spell player, refVar.disable), now I have to actually script the activator to check if it's in the same cell as the player, no? Or do I just have to check the Persistant box? I'm not too familiar with the distinction between normal and Persistant references. --[[User:DragoonWraith|DragoonWraith]] 01:10, 23 May 2006 (EDT)
::::OK, (far) more complicated than I wanted, but conceivable... you could use [[GetInSameCell]] with that. Definitely would have preferred to keep the activator in the script (i.e. set refVar to PlaceAtMe activator 1 0 0, refVar.Cast spell player, refVar.disable), now I have to actually script the activator to check if it's in the same cell as the player, no? Or do I just have to check the Persistant box? I'm not too familiar with the distinction between normal and Persistant references. --[[User:DragoonWraith|DragoonWraith]] 01:10, 23 May 2006 (EDT)
:::::Check out the [[Talk:OnLoad|OnLoad commentary]] and the thread linked therein for a similar problem. Our solution there is to have a running quest script that increments a global counter that serves as a reference. Other objects can check the counter against internal copies to see if they haven't run their gamemode block in a while, which indicates they weren't in the player's cell. Anyhow, it may not be the best way to solve your problem, but it's another way of looking at it. -- [[User:Nezroy|Nezroy]] 11:09, 23 May 2006 (EDT)

Latest revision as of 10:09, 23 May 2006

I cannot for the life of me figure out how to use this function. I have the following code:

if ( IsPlayerMovingIntoNewSpace == 1 )
  set variable to 1
elseif ( variable == 1 )
  ;do stuff
endif

As far as I can tell, that should do something upon the load of a new cell - but as far as I can tell, it's not working... WTF? --DragoonWraith 22:17, 22 May 2006 (EDT)

I wonder if it isn't a Condition function (only available in AI Conditionals) --Tegid 22:31, 22 May 2006 (EDT)
The article would imply that... damn, how the hell are we supposed to know if the player has gone into a new cell?! --DragoonWraith 00:32, 23 May 2006 (EDT)
Hmmm, what about leaving a persistent reference put as long as it is in your cell, if it is not in your cell, then you've moved to a new cell? Move it to you and then repeat? Can't we determine if an object is in the players cell? --Tegid 00:54, 23 May 2006 (EDT)
OK, (far) more complicated than I wanted, but conceivable... you could use GetInSameCell with that. Definitely would have preferred to keep the activator in the script (i.e. set refVar to PlaceAtMe activator 1 0 0, refVar.Cast spell player, refVar.disable), now I have to actually script the activator to check if it's in the same cell as the player, no? Or do I just have to check the Persistant box? I'm not too familiar with the distinction between normal and Persistant references. --DragoonWraith 01:10, 23 May 2006 (EDT)
Check out the OnLoad commentary and the thread linked therein for a similar problem. Our solution there is to have a running quest script that increments a global counter that serves as a reference. Other objects can check the counter against internal copies to see if they haven't run their gamemode block in a while, which indicates they weren't in the player's cell. Anyhow, it may not be the best way to solve your problem, but it's another way of looking at it. -- Nezroy 11:09, 23 May 2006 (EDT)