Isplayermovingintonewspace

Post » Tue Sep 21, 2010 7:37 am

I want to update a form list when the player changes cells or the like. So I thought I would use the function IsPlayerMovingIntoNewSpace to test if that was occuring. However, the function never returns true when used in a GameMode block in a script running on a helmet the player is wearing. The script test segment looks like this:

Begin GameMode     If IsPlayerMovingIntoNewSpace          printc "Player moved into New Space "     EndIfEnd


The printc text never appears in the console. I assume that my use of the function is incorrect. How does one test if the player is moving into new space before he actually does? Or how can one test that the player just arrived into a new space? Either way would work for my needs, I think.
User avatar
Charlie Ramsden
 
Posts: 3434
Joined: Fri Jun 15, 2007 7:53 pm

Post » Mon Sep 20, 2010 5:07 pm

Given the parts of the game that take place in http://geck.gamesas.com/index.php/GameMode, I wouldn't expect http://geck.gamesas.com/index.php/IsPlayerMovingIntoNewSpace to return 1 during http://geck.gamesas.com/index.php/GameMode. Have you tried calling it in http://geck.gamesas.com/index.php/MenuMode instead?

If you want to run some code whenever the player changes their current cell, then http://geck.gamesas.com/index.php/IsPlayerMovingIntoNewSpace wouldn't be the way to go about it.

Cipscis

EDIT:

Is it just me, or are the links in my post not showing up as links? As usual, I've linked to every the GECK Wiki's documentation of each function and blocktype that I've mentioned, but they just look like regular text to me.

Cipscis

EDIT:

I found the problem, thanks to Alleystria. It turns out I was missing the "http://" from my urls.

I guess either the forum now validates urls before it decides whether or not to show them, or my web browser has changed how it uses auto-complete.

Cipscis
User avatar
KRistina Karlsson
 
Posts: 3383
Joined: Tue Jun 20, 2006 9:22 pm

Post » Tue Sep 21, 2010 4:37 am

How you could do it instead:
have an invisible permanent reference cellChecker. Then:
if cellChecker.getInSameCell player == 0   cellChecker.moveTo player   ; Cell changeendif

User avatar
Marie Maillos
 
Posts: 3403
Joined: Wed Mar 21, 2007 4:39 pm

Post » Tue Sep 21, 2010 12:00 am

Given the parts of the game that take place in GameMode, I wouldn't expect IsPlayerMovingIntoNewSpace to return 1 during GameMode. Have you tried calling it in MenuMode instead?

If you want to run some code whenever the player changes their current cell, then IsPlayerMovingIntoNewSpace wouldn't be the way to go about it.

Cipscis

EDIT:

Is it just me, or are the links in my post not showing up as links? As usual, I've linked to every the GECK Wiki's documentation of each function and blocktype that I've mentioned, but they just look like regular text to me.

Cipscis

Yea they arent links to me either. However GECK has a black dotted underline, which from my reply is aparantly you noting its an Acronym. Dont know why the links are broken...
User avatar
Ice Fire
 
Posts: 3394
Joined: Fri Nov 16, 2007 3:27 am

Post » Mon Sep 20, 2010 7:18 pm

How you could do it instead:
have an invisible permanent reference cellChecker. Then:
if cellChecker.getInSameCell player == 0   cellChecker.moveTo player   ; Cell changeendif



Sweet! Easy and functional. Thanks a bunch.

Now for the 'I feel dumb' part. Aside from removing branches from a nif, how could one make an invisible / collisionless object. Or is this the only way?
Hmm, maybe an xmarker would work.
User avatar
Setal Vara
 
Posts: 3390
Joined: Thu Nov 16, 2006 1:24 pm

Post » Mon Sep 20, 2010 10:25 pm

Sweet! Easy and functional. Thanks a bunch.

Now for the 'I feel dumb' part. Aside from removing branches from a nif, how could one make an invisible / collisionless object. Or is this the only way?
Hmm, maybe an xmarker would work.

Perhaps you could make a unique object inthe geck, that uses the 'model' of the xmarker. So its simply a unique special null reference.
User avatar
christelle047
 
Posts: 3407
Joined: Mon Apr 09, 2007 12:50 pm

Post » Tue Sep 21, 2010 8:45 am

Why would you need a new object when an xmarker reference would be fine.
User avatar
Music Show
 
Posts: 3512
Joined: Sun Sep 09, 2007 10:53 am


Return to Fallout 3