Scripts / can someone help please.

Author
Message
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 11th Feb 2018 21:27
i have this script on a floppy disk.


it is working like it should when i test it on an empty map in the first picture.
the script let the disk move forward and backwards in to the pc .
it works fine.
but as soon as i put the same script on the same entity in my map , in the second picture, then the script do not work at all.

i do not know why, i have tried everything but i can not get it to work at all in my map

would appreciate any help.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Attachments

Login to view attachments
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Feb 2018 00:05 Edited at: 12th Feb 2018 00:08
is PlayerDist a global variable now?
try adding
PlayerDist = GetPlayerDistance(e)

also best to make sure you are using local variables when possible like
local movestiffy = 0
above the init(e) so other scripts won't interfere if they are using the same variables.


lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 12th Feb 2018 03:38
Thank You Smallg will try when im at home.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 12th Feb 2018 16:53
Smallg, thank you my friend. it works perfect.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Login to post a reply

Server time is: 2024-04-19 21:35:12
Your offset time is: 2024-04-19 21:35:12