Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   What happened to player.dir? (https://forums.graalonline.com/forums/showthread.php?t=79060)

TSAdmin 03-17-2008 08:34 AM

What happened to player.dir?
 
I hadn't noticed it until I needed it for something, but has anyone else noticed that setting a players direction doesn't stick, anymore?

EG: To test it, I threw a player.dir = 2; in an onActionGrab function and it visually set my dir to direction 2, and half a second later (or less) I was facing back the way I was before grabbing the NPC to change it o.o The only way I've found it will stick is if I also set the player to freeze, but I'd rather them to be not frozen in this instance.

Anyone else getting this as well?

[email protected] 03-17-2008 11:44 AM

Nothing.
PHP Code:

//#CLIENTSIDE
function onWeaponFired() 
  {
    
$random int(random(04));
    
player.dir $random;
  } 


Crow 03-17-2008 04:05 PM

Quote:

Originally Posted by TSAdmin (Post 1380290)
I hadn't noticed it until I needed it for something, but has anyone else noticed that setting a players direction doesn't stick, anymore?

EG: To test it, I threw a player.dir = 2; in an onActionGrab function and it visually set my dir to direction 2, and half a second later (or less) I was facing back the way I was before grabbing the NPC to change it o.o The only way I've found it will stick is if I also set the player to freeze, but I'd rather them to be not frozen in this instance.

Anyone else getting this as well?

Thats our movement TSA. I still have to fix that ;D

TSAdmin 03-17-2008 04:40 PM

Quote:

Originally Posted by Crow (Post 1380322)
Thats our movement TSA. I still have to fix that ;D

I figured as much the moment I realised one of the GST's spent nearly 30 minutes in this thread (According to the Who's Online section :p) and then merely logged off, so it crossed my mind that it wasn't happening elsewhere.

coreys 03-17-2008 11:30 PM

Quote:

Originally Posted by [email protected] (Post 1380298)
Nothing.
PHP Code:

//#CLIENTSIDE
function onWeaponFired() 
  {
    
$random int(random(04));
    
player.dir $random;
  } 


Probably because "$" isn't a valid character for variable identifiers.

Tolnaftate2004 03-18-2008 12:58 AM

Quote:

Originally Posted by coreys (Post 1380441)
Probably because "$" isn't a valid character for variable identifiers.

I wouldn't bet on it.

p2p_Sir_Link 03-18-2008 01:00 AM

Quote:

Originally Posted by coreys (Post 1380441)
Probably because "$" isn't a valid character for variable identifiers.

works fine for me :confused:

Chompy 03-18-2008 01:09 AM

Quote:

Originally Posted by coreys (Post 1380441)
Probably because "$" isn't a valid character for variable identifiers.

Uhm, I think you got Sidney's post wrong, since she replied to TSAdmin that there was nothing wrong with it and showed a script she made to show..

:p

Rapidwolve24 03-18-2008 01:29 AM

Quote:

Originally Posted by Crow (Post 1380322)
Thats our movement TSA. I still have to fix that ;D

Lol.


All times are GMT +2. The time now is 08:00 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.