Scripts / Corno_1 Script Thread

Author
Message
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 11th Mar 2015 11:04 Edited at: 26th Feb 2016 14:26
Hi,

this is my little scripting thread. Here I will store all my scripts or at least links to the scripts to make it easier to find them.
If you have problems, just say it and I will fix it as soon as I read it or at least explain why it is not working in the current state.

All scripts can be used commercial and uncommercial for free. Do not tell anyone you made this. Thanks.
Credit is not necessary, but appreciated

Legend:
: Working script (tested from forum users)
: Updated script on date (Day.Month.Year)(Not tested)
: Broken script
: No support anymore

Flycam (WIP) (11.03.15) :
https://www.dropbox.com/s/7yogdeutwiuznuv/flycam.zip?dl=0

Floating Weapon Script:
https://forum.game-guru.com/thread/210824

Entity Repair Script:
https://forum.game-guru.com/thread/209351

Multi Level Health and Life transfer:
https://forum.game-guru.com/thread/212116

AI vs AI(WIP)
https://forum.game-guru.com/thread/213283

Adaptive Crosshair
https://forum.game-guru.com/thread/214129

Gamezone
https://forum.game-guru.com/thread/211236#msg2537372

Search for key script + weapon float script
https://forum.game-guru.com/thread/211236#msg2542554

Corno_1
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 11th Mar 2015 11:04 Edited at: 20th Feb 2016 22:10
How to start scripting:

GG Tutorials:
http://steamcommunity.com/sharedfiles/filedetails/?id=398177770
https://forum.game-guru.com/thread/212794


Some Basic Lua tutorials:
English:
http://www.lua.org/pil/1.html
Crash Courses:
http://luatut.com/crash_course.html
http://tylerneylon.com/a/learn-lua/

German:
http://lua.gts-stolberg.de/

Some Lua Editors:
Test them all and find your favorite, there is not a best one.
https://notepad-plus-plus.org/ - Here is a syntax highlighting addon for GG: https://forum.game-guru.com/thread/213931
http://studio.zerobrane.com/ - Has a compile function, so you can find smaller lua syntax mistakes
http://luaedit.sourceforge.net/ - Just another option(I did not use this, but maybe you find it good)

If you have a editor and some basic knowledge you should start with GG functions. Your best friend will be the Prompt("string") command. In programming there is no wrong or right, it counts if it works or not. Of course there is a good commented or optimised version, but you started scripting, so let this be your last optional part of scripting

As a small tipp: Nearly every command is in the global.lua in your scriptbank folder.

Before you say a script do not work, test this:
Go into properties and look for
static Mode = NO (if your entity is now away set: Immobile=Yes)
Always active=Yes (if it now works, you are just to far away)

How to start in a logical row:
1) Simple and advanced text messages, timer events (if you understand that, you can start your Quest system)
2) X-Y-Z axis for player and entities (play with it, read it, change it and so on)(be sure you disable collision for entities if you move them)
3) Test Environment Lua Commands like SetFogBlue(v) and so on(optional)
4) Learn to use GG. Ok how I mean this: GG is in a state where a lot of stuff is included, but you maybe never use it. But you will be no good scripter if you not undertand how to read the global.lua. It has a lot of commands and should know what can be done or not, or how to work around.

After you did this a lot and think you undertstand itno row)
*) AI expirience with animation
*) Hear what people in the forum want and try to archieve (Inventories, Quest Systems, a complete Environment changer,...)
*) Think what you need and develope it
*) Learn to use functions. If your script should be optimised, use functions. This are commands you write yourself in the script, because it is a calculation, you need a part of a script more often, or your script becomes unclear.

Functions Example:


Of course this is no tutorial, but for all beginners it should give a small way to orientate oneself.

Happy learning
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
GoDevils
9
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 25th Mar 2015 20:33
Thanks Corno_1

I just downloaded and will take a look

"THERE IS NO SPOON"

AMD 6300 6 core 3.5 ghz, Windows 8.1, 8GB ram, GTX 650 2GB ram
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 25th Mar 2015 20:38
I downloaded it also.. gonna take a look

Thanks

Harry
Harry
PM
GoDevils
9
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 25th Mar 2015 21:37
Hi Crono_1

OK, great I got it to work, standing on the hood of a car. Very cool,

That said, a video I saw (wish I knew where it is) showed the player on the deck of a flying airship, and while flying the player could walk around on the deck. When I try to use the regular arrow keys to move the player with your scripts, I cannot move around without the platform also moving . Also, when it first starts I'm transported to the flying entity without actually entering the trigger zone??

As is this is a great and simple script which I can use for many things. Do you have solutions for the above questions?

Thanks again
"THERE IS NO SPOON"

AMD 6300 6 core 3.5 ghz, Windows 8.1, 8GB ram, GTX 650 2GB ram
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 25th Mar 2015 22:06
This would be a complete different script. This script just move the entity and teleport the player to its position. The trigger entity is just to teleport the player.

Sent me a pm what you wish for a script and I will see what I can do
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 26th Mar 2015 11:03 Edited at: 26th Mar 2015 11:14
you're referring to this https://forum.game-guru.com/thread/211357#msg2512878, i think it just uses a different collision mode so the player can walk around on top of it?
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 4th Jan 2016 12:22
Thread unlocked at OP's request.
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

Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 4th Jan 2016 13:36
Thanks
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 4th Jan 2016 21:24
As an opening a small script:

This script set a triggerzone to the game area. If the player leave it, he gets a message to return otherwise he dies.


Of course it is up to you to modify it with fog, huds and so on
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 5th Jan 2016 22:59
Thank you Corno_1
Much appreciated...a very handy script...

Harry
Harry
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 19th Feb 2016 23:01
Weapon script which let your weapon float(FPSC Classic guys know what I am talking about )
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 26th Feb 2016 14:24
Search for key script:
(place a key in a trashcan or anything else, give the key this script and set him to immobile)
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM

Login to post a reply

Server time is: 2024-04-28 19:25:18
Your offset time is: 2024-04-28 19:25:18