Scripts / Water Wave Editor

Author
Message
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 4th Mar 2018 13:41 Edited at: 4th Mar 2018 15:38
HI all. I noticed this request on the forums so I decided to write a script to allow easy editing of water levels and a wave system (up and down only no actual waves). I've probably gone a lot further than I should have lol, but it should be of use.
Add this script to any active object and you should then be able to change water height and set a start and end height to make the water bob up and down. You can save the settings to a file to use after also. I haven't wrote a script to utilise it other than this one, but it won't be a difficult task to do if anyone needs it.

I've now added a standalone script to move the water after setting it in the editing script.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.

Attachments

Login to view attachments
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 4th Mar 2018 13:52
Thank you. Will check it out.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Mar 2018 14:04
'load' is a Lua function, your script is using it as a variable so any scripts that rely on 'load' working (SwitchScript?) will no longer function properly

Been there, done that, got all the T-Shirts!
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 4th Mar 2018 15:24
Really? Well I've had no issues here with it working, easy enough to change of course if it causes any issues. It's merely the flag name for checking you have pressed the load key to stop it loading up over and over. I'll change it and re-upload.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Mar 2018 15:41
It's an easy mistake to make as unlike other languages Lua doesn't stop you from replacing core functions. I don't think any of my scripts rely on the load command but can't speak for any of the other scripts out there.
Been there, done that, got all the T-Shirts!
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 5th Mar 2018 12:44
Well, I have changed it to loading now just in case
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 5th Mar 2018 15:40
Neat. I planned on doing something similar when I got time. Glad to see this is finding it's way out there into the general population.

Does remind me I need to update my notepad API for the newest PP functions though >_>
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 5th Mar 2018 16:20
I just learned something new... that using similar variable names from the core actually may break things. This is good to know. I've had really strange things happen in GG with some of my scripts. Now I know why
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 5th Mar 2018 16:47
Quote: "I just learned something new... that using similar variable names from the core actually may break things. This is good to know. I've had really strange things happen in GG with some of my scripts. Now I know why "


Yup, learnt that the hard way myself. Always make unique variable names for your scripts, that way it won't conflict with anything else. I suppose it makes sense though, you have a variable changed by your script, but that variable is also in a core script so the two fight over control of the variable.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 6th Mar 2018 12:52
So besides the variable names lol, has anyone found it useful? You can't duplicate array names with variables either, even in the same script, which I always find annoying. Still I got the impression I was using a lua command, not a variable duplication as above

Hopefully it's so easy to use there's no issues at all

@Belidos found some Thoranium yesterday btw
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 6th Mar 2018 12:57
Quote: "@Belidos found some Thoranium yesterday btw"


Cool, i sent you a message in game, but i wasn't sure if you saw it, it's no particularly good Thoranium, but when it's that rare to spawn, then anything will do lol.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 6th Mar 2018 13:10
Just need it to grind So just glad it spawned.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 6th Mar 2018 14:00
Yeah it's a pain, i'll keep an eye on galaxy harvester for you, and whenever it pops up i'll stick some harvesters on it, i think i actually switched my three heavies and two mediums to it when the steel i was harvesting despawned, won't be on high amounts but should help. Which reminds me i need to log on tonight to sort out my harvesters.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 6th Mar 2018 18:34
Of course I have now run out of Skevron gas lol, typical. Got through 9k in no time Ah well time to wait again.

If anyone wonders what we are on about we both play SWG on occasion
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Mar 2018 19:38
"You can't duplicate array names with variables either, even in the same script, which I always find annoying".

Can you explain what you mean by this?
Been there, done that, got all the T-Shirts!
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 7th Mar 2018 14:01
Well, for example, if I have an array called array() and use a variable called array I always get issues. Never found lua to like it. Falls over every time. I often do it in other languages to keep things tidy and easy to see what is what.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 7th Mar 2018 19:24
Well that's because Lua doesn't really have 'types' in the same way other languages have, for example there is no 'array' type.

To specify a table you use {} but the name of it is just the name, so array = {} just specifies a table called 'array'.

If you do the following:

array = {}

bob = array

array = 1

Then both array and bob will now be 1!

Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-04-20 09:02:27
Your offset time is: 2024-04-20 09:02:27