Scripts / Entity Spin

Author
Message
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 30th May 2017 17:03 Edited at: 30th May 2017 17:39
Hi Guys, is there anyway to make an entity spin on its own axis? I have tried using spinloop.lua but it does not seem to want to work.

I want the attached to rotate slowly it is 600 meters long and 300 meters wide its quite big so I think a slow rotation would look best but cannot figure it out
Welcome to the real world!
Windows 10 Pro x64 - Core i7-2600K @3.40GHz - 32.0GB RAM - GeForce GTX 950 2GB - 4x500GB SSD Striped

Attachments

Login to view attachments
Freakon
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: UK
Posted: 30th May 2017 17:48 Edited at: 30th May 2017 17:50
@GraPhiX

RotateY(e,40) or whatever speed you need, or Axis you need

Pretty sure this is it but Im not at home to test it
Processor: Intel Core i5-7400
Memory: 16GB DDR4 2133MHz
Graphics Card: NVIDIA GeForce GTX 1060 6GB
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 30th May 2017 20:00
thank you Freakon I already have that from this script



but the entity does not rotate, what should I select and change in the entity properties, please be aware I have no animations in the model I just want it to spin, I currently have it set to dynamic not static
Welcome to the real world!
Windows 10 Pro x64 - Core i7-2600K @3.40GHz - 32.0GB RAM - GeForce GTX 950 2GB - 4x500GB SSD Striped
Freakon
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: UK
Posted: 30th May 2017 20:32 Edited at: 30th May 2017 20:33
Strange, no probs with the script, is it called the same spinloop.lua

No caps or spaces?

Processor: Intel Core i5-7400
Memory: 16GB DDR4 2133MHz
Graphics Card: NVIDIA GeForce GTX 1060 6GB
Freakon
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: UK
Posted: 30th May 2017 20:41 Edited at: 22nd Sep 2018 18:38
edit: Video removed
Processor: Intel Core i5-7400
Memory: 16GB DDR4 2133MHz
Graphics Card: NVIDIA GeForce GTX 1060 6GB
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 30th May 2017 21:55
yes it is in the scriptbank folder

I will write a custom script in the morning and try that, will let you know, thank you for your help, it is much appreciated
Welcome to the real world!
Windows 10 Pro x64 - Core i7-2600K @3.40GHz - 32.0GB RAM - GeForce GTX 950 2GB - 4x500GB SSD Striped
Freakon
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: UK
Posted: 30th May 2017 22:05
The only other thing I can think of if collision is on, and you have removed Terrain, it may may still be colliding with the terrain? preventing it from rotating
Processor: Intel Core i5-7400
Memory: 16GB DDR4 2133MHz
Graphics Card: NVIDIA GeForce GTX 1060 6GB
Len the man
9
Years of Service
User Offline
Joined: 12th Jun 2015
Location:
Posted: 30th May 2017 23:02
I was given a script to make tumbleweed roll on the ground in my game... You can find the script in my WIP thread:

https://forum.game-guru.com/thread/216086?page=2#msg2570017
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 31st May 2017 08:10
If the player is a long way from the origin of the model you will need always active equal to yes or the script won't be operating.

Cheers.
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 31st May 2017 10:53
Thanks to all your help guys, I created a new script


recreated the scene and bingo it now works, I tried the spinloop.lua script and it stopped working, its very strange I even verified my files and all was ok so I am not sure what is wrong with that stock script but it wont work on my PC

Welcome to the real world!
Windows 10 Pro x64 - Core i7-2600K @3.40GHz - 32.0GB RAM - GeForce GTX 950 2GB - 4x500GB SSD Striped
Freakon
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: UK
Posted: 31st May 2017 11:02
Makes a big difference! Really adds to the scene! looking good
Processor: Intel Core i5-7400
Memory: 16GB DDR4 2133MHz
Graphics Card: NVIDIA GeForce GTX 1060 6GB

https://www.game-guru.com/images/gameguru-logo.png
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 31st May 2017 11:27
thank you now I have to finish the ship and texture it
Welcome to the real world!
Windows 10 Pro x64 - Core i7-2600K @3.40GHz - 32.0GB RAM - GeForce GTX 950 2GB - 4x500GB SSD Striped
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 31st May 2017 19:36
that is strange, spinloop.lua is basically the exact same script (works fine for me).
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 31st May 2017 20:43
@smallg yes strange indeed, I have since deleted spinloop.lua verified my files it re downloaded it but still didn't work !!
I managed to get it working by creating the file manually in Notepad+ not sure what happened to it
Welcome to the real world!
Windows 10 Pro x64 - Core i7-2600K @3.40GHz - 32.0GB RAM - GeForce GTX 950 2GB - 4x500GB SSD Striped

Login to post a reply

Server time is: 2024-12-23 05:55:09
Your offset time is: 2024-12-23 05:55:09