Scripts / [STICKY] AmenMoses scripts land fill thread.

Author
Message
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 14th Sep 2018 17:02 Edited at: 14th Nov 2019 21:37
In response to popular demand (i.e. the bloke that asked is quite popular) I will start filling this thread post with links to all my 'stuff' that has accumulated around here over the last few years so people can find it more easily.

I'll also use this thread to post any useful little scripts that I may have lying around that others may find useful.

First though a disclaimer: Some of these scripts were developed some time ago, since which GameGuru has 'evolved' somewhat. If you find any that do not work as advertised with the latest version of GG please send me a PM and I will endeavour to fix it.

My rewrite of DVader's Body script : https://forum.game-guru.com/thread/219891

Physics library tutorial : https://forum.game-guru.com/thread/219758#msg2601608

Sprite based fonts library : https://forum.game-guru.com/thread/219811
!!! new textlib.lua attached to this post, now with rotation of text !!!

Driveable Truck : https://forum.game-guru.com/thread/219729

Improved ai_viewanimations.lua : https://forum.game-guru.com/thread/219262

Fun with board games : https://forum.game-guru.com/thread/219163

DIY 'Moonlander' thingy : https://forum.game-guru.com/thread/219125

Zones using waypoints : https://forum.game-guru.com/thread/218470
(Added zonelib.lua to this thread)

Hidden Object game script : https://forum.game-guru.com/thread/218548

Whacky Racers scripts walk-thru : https://forum.game-guru.com/thread/218283

Gun Turrets : https://forum.game-guru.com/thread/218176

Platform/Entity mover stuff : https://forum.game-guru.com/thread/216730#msg2563082

Jump Pad script : https://forum.game-guru.com/thread/220466#msg2611159

Freeze player script: https://forum.game-guru.com/thread/220055#msg2614939

Boat script using physics: https://forum.game-guru.com/thread/220055#msg2615182

Notes using particles system: https://forum.game-guru.com/thread/220804#msg2616252

Particle tester: https://forum.game-guru.com/thread/220055#msg2622747

Light control: https://forum.game-guru.com/thread/220055?page=2#msg2622840

Sound control: https://forum.game-guru.com/thread/220055?page=2#msg2622953
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
Duchenkuke
GameGuru BOTB Developer
3
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 14th Sep 2018 19:02
finally a thread for all your great work. Awesome idea !
Pirate Myke
Forum Support
9
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th Sep 2018 21:19
Excellent. Thanks.
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.

JPH-GAMES
3D Media Maker
4
Years of Service
User Offline
Joined: 13th Feb 2015
Location: Belgique
Posted: 15th Sep 2018 06:49
A big thank you AmenMoses, will facilitate the research, very precious .

Intel Pentium CPU G3220 3.000 GHz , 8 GB Ram , NVIDIA GeForce GTX 745 2GB , Windows 10 64-bit.
GameGuru , S2Engine HD , Shoot EM Up , CopperCube 5 , Clicteam Fusion 2.5 , Platfinity .
Bod
GameGuru TGC Backer
4
Years of Service
User Offline
Joined: 21st Dec 2014
Location: Preston Lancashire
Posted: 4th Oct 2018 23:41 Edited at: 5th Oct 2018 12:36
@AmenMoses

Has your pickuppable script changed with the newest PP ? I hadn't loaded the level I use it on since the recent update until today and now it's gone back to when I had a problem before, if the player has a weapon then carries something and tries to rotate it with the right mouse button the weapon is re-selected and the player movement is locked, I tried restarting GG and also restarting my computer but it still does it. I posted here because the original thread is locked.
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Oct 2018 00:23 Edited at: 5th Oct 2018 00:35
No but the gameplayercontrol.lua may have done. I'll check on my end to see if I have the same problem.

Try this.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
Bod
GameGuru TGC Backer
4
Years of Service
User Offline
Joined: 21st Dec 2014
Location: Preston Lancashire
Posted: 5th Oct 2018 10:19
Thanks that's fixed it, I assume it will be overwritten with each update so I will keep a copy of this one in a separate folder.
Bod
GameGuru TGC Backer
4
Years of Service
User Offline
Joined: 21st Dec 2014
Location: Preston Lancashire
Posted: 5th Oct 2018 14:09 Edited at: 5th Oct 2018 14:23
There are now other problems with pickuppable, as happened a while ago sometimes after carrying something the player can no longer jump and if you pick something up then throw it using E + LMB onto another entity like a floor the object you throw is launched into the sky at great speed.


AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Oct 2018 18:21 Edited at: 5th Oct 2018 18:23
Yes, not sure what causes the over reaction on collision, will have to hunt though the GG code to figure that one out! But it isn't actually shooting off the map as you imagine, Lee put a 'fix' into the engine at some point which automatically destroys any objects with health of 0, the pickuppables script contains collision detection for thrown objects which forces their health to zero on collision (so that for example exploding entities will explode when thrown at something). So your thrown object is being destroyed by Lee's 'fix'.

To fix this you can comment out the line
SetEntityHealth( P.ObjectToEntity( thrownObj ), 0)
in the script but obviously thrown objects will no longer explode!

The line is in the function CheckThrowCollision() btw.

The jumping thing should also be fixed by that as it is due to the entity not being around anymore to reenable jumping!
Been there, done that, got all the T-Shirts!
PM
Bod
GameGuru TGC Backer
4
Years of Service
User Offline
Joined: 21st Dec 2014
Location: Preston Lancashire
Posted: 5th Oct 2018 19:37
It isn't being destroyed, it comes back down to earth eventually but it's quite a long wait and quite a distance from where it was originally lobbed, in my WIP game I stumbled across it further into the level and in the test map I saw it drop in the distance after I stopped recording, I then made it heavier and it came down sooner and closer to the player.
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Oct 2018 20:42
Interesting, when I tried it it got destroyed. Hmm, can't explain that one, what weight have you got set on it when it does that?
Been there, done that, got all the T-Shirts!
PM
Bod
GameGuru TGC Backer
4
Years of Service
User Offline
Joined: 21st Dec 2014
Location: Preston Lancashire
Posted: 5th Oct 2018 21:50
Physics weight 300, it still goes a long way but doesn't take as long to come back down, if you try it indoors it hits the ceiling and drops back down.
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Oct 2018 11:56
Are you using the latest Beta? I can't replicate it my end but then realised I'm running my own local build so maybe it was something in the Beta that caused it?
Been there, done that, got all the T-Shirts!
PM
Bod
GameGuru TGC Backer
4
Years of Service
User Offline
Joined: 21st Dec 2014
Location: Preston Lancashire
Posted: 6th Oct 2018 13:57
No, I'm running the latest Public Preview.
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Oct 2018 16:32
Curious, I can't replicate it, I wonder if it has something to do with the entity you are throwing it at, what is that in the video?
Been there, done that, got all the T-Shirts!
PM
Bod
GameGuru TGC Backer
4
Years of Service
User Offline
Joined: 21st Dec 2014
Location: Preston Lancashire
Posted: 6th Oct 2018 18:05 Edited at: 6th Oct 2018 18:42
It does it with every entity I try, if you throw it against a wall it also flies off somewhere, I'm also getting the can no longer jump after carrying something error but that only happens on occasion, especially if I have used a weapon beforehand or tried to jump when carrying something, none of this happened with the previous version of GG, it's only since the updated AI PP, throwing isn't essential for me so I have made a version of your script and set throwEnabled to false but I'm still sometimes having problems jumping.
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Oct 2018 19:02
Hmm, okay. I'm in the middle of a rewrite of the pickuppables anyhow, plus I'm tinkering in the engine with mass/force calculations in various places, hopefully in the next week or so I'll be pushing the results of my efforts and all will be a lot better.
Been there, done that, got all the T-Shirts!
PM
Bod
GameGuru TGC Backer
4
Years of Service
User Offline
Joined: 21st Dec 2014
Location: Preston Lancashire
Posted: 6th Oct 2018 21:46
I'll look forward to it, thanks for the help.
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Nov 2018 10:55
Attached is a new script for Bod's buttons.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
Flatlander
GameGuru Master
12
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 5th Nov 2018 21:29
Thanks for this thread.
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory
igormm77
1
Years of Service
User Offline
Joined: 26th Jan 2018
Location:
Posted: 6th Nov 2018 00:29
Thank you very much, everything works.
PM
igormm77
1
Years of Service
User Offline
Joined: 26th Jan 2018
Location:
Posted: 8th Nov 2018 07:05
Sorry for disturbing
Where can I get a simple driving script?
Your script that you put on this forum is very good, but for me it is complicated - I recently worked with GameGuru. Can I have a top view and control?
thank

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 8th Nov 2018 19:44
It does have 'top view' or at least a 3rd person style view.
Press the Q key to switch from first person to third person.
Change the values tpZoff and tpYoff to change the camera position.
In the AttachPlayer function change the '25' value (in two places) to alter the 'look-down' angle.
Been there, done that, got all the T-Shirts!
PM
igormm77
1
Years of Service
User Offline
Joined: 26th Jan 2018
Location:
Posted: 9th Nov 2018 00:12
Yes, I know, but it does not work for me.
I took the finished model and redid it (I cannot model it myself yet ¯ \ _ (ツ) _ / ¯ )
Maybe I'm doing something wrong?
(I haven’t changed the wheel and steering coordinates yet - I don’t know what they look like with the car)

For some reason, I don’t get any scripts with cars - neither yours, nor taxis, nor the movement of wei-points, I can’t make the car move. They either do not work, or turn blue and jump.

thank

Attachments

Login to view attachments
PM
igormm77
1
Years of Service
User Offline
Joined: 26th Jan 2018
Location:
Posted: 9th Nov 2018 00:28
No, no, I apologize for the trouble ... I attached the wrong folder ((
PM
igormm77
1
Years of Service
User Offline
Joined: 26th Jan 2018
Location:
Posted: 9th Nov 2018 06:15
Sorry, here is the correct model.

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Nov 2018 11:00
You need to pop your model into a 3d app and scale and position it correctly.

Currently in the fpe file you have a scaling factor of over 2000, as the scripts need to use the scaling factor to figure out where to put the wheels etc that is why it will not work.

The origin for the vehicle body needs to be in the centre of the rear axle with the front of the model in +ve Z.


Been there, done that, got all the T-Shirts!
PM
igormm77
1
Years of Service
User Offline
Joined: 26th Jan 2018
Location:
Posted: 10th Nov 2018 00:09
Understood, thanks, I will try
PM
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 2nd Dec 2018 22:20
Follow link for new pickuppables stuff:

https://forum.game-guru.com/thread/220290#msg2609040
Been there, done that, got all the T-Shirts!
PM
granada
GameGuru TGC Backer
17
Years of Service
Recently Online
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 2nd Dec 2018 22:51
Thanks Amen,testing tomorrow

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
Blacknyt46
3
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 19th Dec 2018 01:19
AmenMoses, the Moonlander thingy is missing one of its scripts: dynamic_entry.lua. Unfortunately I don't have it anymore. My hdd took a leap of faith. It's the script for the nozzle exhaust. Thank you
Jim C
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 19th Dec 2018 19:52 Edited at: 19th Dec 2018 19:54
https://forum.game-guru.com/thread/219125#msg2592694

Isn't that is?


Ahh, I mistyped the instructions a bit, should have been dynamic_entity.lua!
Been there, done that, got all the T-Shirts!
PM
Blacknyt46
3
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 20th Dec 2018 13:53
No problem-o, I made a level using your scripts. Thank you by the way,they are Awesome! I put the Sci Fi dome over the map. So the ship won't go out of bounds. But, with no collision on the ship, it will just fly through it. Is there some sort of way to put a no fly zone=stay in with in the dome? I tried the invisible wall script on the dome just for sheet and giggles with no luck. It will just fly through.(no collision on the ship) Hmm maybe there is some way to kill it when it touches the dome? It would be nice if it bounced off. Thanks
Jim C
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Dec 2018 19:13
You would have to put some checks in the code to either detect objects (i.e. with raycasting) or a simple check on x&z values to stop it going out of bounds.

The truck scripts have collision detection in them, take a look at how it's done there.
Been there, done that, got all the T-Shirts!
PM
Blacknyt46
3
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 21st Dec 2018 03:43
I'll do that. Thank you for your advise.
Jim C
Blacknyt46
3
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 28th Dec 2018 05:44
I can't get the sound to work for the truck. What happened? I thought maybe I'm doing something wrong. Can somebody try it and see if it's working. Or is it on my end? Thanks
Jim C
Blacknyt46
3
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 23rd Jan 2019 21:06
Never mind, I fixed it myself. It was a windows 10 update that screwed everything up.
Jim C
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 16th Feb 2019 10:40


Showing off new addition to textlib.lua.
Been there, done that, got all the T-Shirts!
PM
Flatlander
GameGuru Master
12
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 7th Mar 2019 03:00 Edited at: 7th Mar 2019 03:03
I wasn't exactly sure where to post this. I just wanted you to know that in your pickupable script at line 581 you have "PU.getNames( e )". I should be "PU.getName( e ) instead. I had downloaded the script from your "New pickuppables script and library" thread. Perhaps you have already fixed it and put it in another thread. BTW, excellent code.
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 7th Mar 2019 19:25
Cheers for that.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 26th Apr 2019 19:30
Simple little script (at least it is now) that will freeze the player for a period of time.

Attach to an entity and name it as follows:
<description>,<delay>,<distance> e.g. "Door to hell,3000,200"

When the player comes within the specified distance of the entity and is looking in its direction the Sound 0 for the entity will be played, a prompt is shown with the description and the player position will be frozen for the specified period (in milliseconds).

Each entity will only trigger once.

I've left in a debug prompt (line 50) for testing purposes, just comment that line out when you are satisfied it is working.


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

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd May 2019 14:56
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
Bolt Action Gaming
GameGuru Tool Maker
6
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 3rd May 2019 18:01
Nice work man!
Blacknyt46
3
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 4th May 2019 00:04
Nice Amenmoses.
Jim C
HarryWever
3D Media Maker
9
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 5th May 2019 00:24
very cool

cheers
Harry
Harry
When nothing goes right, go left
PM
Pink Panther
9
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 6th May 2019 18:19
Great! Thank you!
PM
synchromesh
Forum Support
5
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 7th May 2019 15:23
fantastic !!
You make this all look so simple
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Flatlander
GameGuru Master
12
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 7th May 2019 19:47
What can I say, but a profound thank you.
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 29th Oct 2019 23:24 Edited at: 31st Oct 2019 22:47
Particles tester, basically allows you to fiddle with values and when happy save out a Lua snippet that can then be incorporated into your scripts.

Select value to change using I & K keys, adjust values using - & + keys (press Shift key to increment x10)

Attach script to an always active entity, edit script to add your own particle image files and shaders.

Changes in this version:
Added gravity, wind, limb index
Auto-saves values (just in case you select a noin-existant limb index and GG crashes) and reloads on restart.
Multiple output files can be generated
Hold Q for 100x increments
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
synchromesh
Forum Support
5
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 30th Oct 2019 22:21
Excellent Thanks Amen
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM

Login to post a reply

Server time is: 2019-12-06 00:35:36
Your offset time is: 2019-12-06 00:35:36