Scripts / [STICKY] Smallg's free scripts

Author
Message
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 1st Dec 2017 14:12
Ahh those == again lol thanks m8 player looking hmm cant remember if not I'll swap it out for player distance
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 1st Dec 2017 19:04 Edited at: 1st Dec 2017 19:07
your problem was mainly that you had the 'if' checks all inside eachother... you can't have a key press be both 0 and 1 at the same time as one of those statements will have to be false if the other is true
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 1st Dec 2017 19:09 Edited at: 1st Dec 2017 19:32
in reply to a PM, script to finish the level after a certain time (i.e. survive till countdown reaches 0).

set entity static = no, always active = yes
enter the next level's name in 'ifused' field
don't forget to also include a winzone with same 'ifused' for standalone purposes (but place it somewhere the player can't reach)
change the time duration in the script

p.s. i think it should work with save / load games but i didn't test it.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 1st Dec 2017 19:31
from feature request - blood pool that grows (would be better to get animated decals but it looks ok for a quick solution).

set 1 entity with blood_for_enemies_control.lua
static = no, always active = yes
set all blood decals with blood_for_enemies.lua
static = no, place them near to your AI in roughly the same numbers (always active = yes is optional but might be recommended if you get issues)
adjust blood_for_enemies.lua script settings to suit
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 2nd Jan 2018 18:19 Edited at: 2nd Jan 2018 18:52
Hi G got a quick question I'm putting together a set of scripts as you know and have been trying to get this particular one to work but getting mixed results mostly not positive lol.
What I'm trying to do id have a crafting bench/cooker etc to craft multiple items instead of one heres the craft dagger script



i was also trying GetInKey and GetScancode so you can cycle through the three items Dagger,Hammer and Axe e.g press keys 1,2 and 3 but that didnt seem to work either :/

Heres the second part which shows the menu ok but KeypressG doesnt seem to work or is that not suposed to? lol


I noticed in your shop script you used a cycle o and p
any chance you could adapt the script for a second item and put in a -- showing where you changed it so i can then adapt it for more items etc etc?
Cheers m8 Hope you had a good New Year
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 2nd Jan 2018 19:09
untested but should work
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 2nd Jan 2018 19:12 Edited at: 2nd Jan 2018 20:29
Thanks m8 will have a play ") expected line 90? so k found it comma missing Edit dont know if its just me but the scancodes for numbers dont seem to work

Ok after a good old testing I changed the metals over to flint as thats what im using here still can't get the 1 and 2 keys to work ? got it to craft the weapon tho yay
if itemname[itemtomake] == itemname[1] then AddPlayerWeapon(37)
ok seem to have it all working now apart from the selection = 1 and 2 keys not responding
Cheers G
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 2nd Jan 2018 21:05
which number keys are you pressing? my script expects the numbers below the function (f) keys, the numberpad will use different scan codes.
put in a
Prompt(g_Scancode)
(inside the main(e) but make sure it's outside any 'if' etc)
then hold down the number you want and see what number is shown on screen
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 2nd Jan 2018 21:30 Edited at: 2nd Jan 2018 21:45
yeah tried both m8 also tried the function key etc etc all the usual just nothing from the number keys tbh with the script i wrote initially the number keys wernt working so im unsure whether its My pc needing varifing, the preview or something else the rest of the script is working sweetly

heres the edited script so far prompts working correctly weapon crafts and adds to the player will add the prompt and test
Edit : yeah its registering correctly m8 press 1 prompt says 2 etc just the script doesnt change weapons :/
Its a really nice script tho m8 didnt expect something that complex that quickly ty but after reading through it i will be able to edit this for food etc pretty easily as its most of your scripting I've learned from so kinda used to your style now

Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 2nd Jan 2018 22:03
oh i think i see the issue, change
if g_Scancode > 1 and g_Scancode < maxitems+1 then -- +1 to maxitems because scancodes start at 2 for number 1
to
if g_Scancode > 1 and g_Scancode <= maxitems+1 then -- +1 to maxitems because scancodes start at 2 for number 1
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 2nd Jan 2018 22:06 Edited at: 2nd Jan 2018 22:09
Spotted! nice one works perfectly thanks G lol your always picking me up on that one rofl
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 9th Jan 2018 10:46 Edited at: 9th Jan 2018 11:04
Hi G sry for the double post I'm kind of stuck on adding a 4th item to a survival cooking stove thingy script, its pretty much the same as the item crafting script just adapted for cooking. The issue i have is when adapted for the 4th item to be crafted gives the error "attempt to comapare nil with a number" at line 95. For the life of me i cannot see why :/. Ive tried numerous things to get it to work with no joy
Also this script is to make non real items to use later e.g pies and soups to give health.

Any chance you could look throough it please m8 and see if you can spot why
also any pointers as to how i can then use them from the inventory script to add health
Cheers m8

The Inventory Script so far:

-


and the food crafting script: (adapted from the one you did for me for food) p.s i get the same error adding new ingredience to both scripts.

Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 9th Jan 2018 18:09
Your script checks for all material/food required for each item but your finished items only require 3 items so if something doesn't require a material then it will error out because a value hasn't been set.
You need to either check the requirement isn't nil first I.e.
if waterneeded[foodtomake] ~= nil then
if g_watercollected >= waterneeded[foodtomake] then
havewater = 1
else
havewater = 0
end
end

Or make sure all requirements are set in the item list (I.e. water needed[3] = 0 etc for all the materials you don't need) - the first method is probably better and easier than this one though.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 9th Jan 2018 21:04 Edited at: 9th Jan 2018 21:04
Oh i see now thank you m8 that makes sense now
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Jan 2018 11:40
vignette radius change on getting hurt (horror game style HUD effect)
place script on an always active object = yes
place image inside "scriptbank/images/hud"
should result in an effect like this


lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 15th Jan 2018 12:37
Awesome work, thanks smallg

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.
science boy
16
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 15th Jan 2018 14:28
hi small g.

in regards to isometric the characters are and will be small so that script you made where within talking or area an image pops up of the character, thats brilliant as it may give some good chats.

not sure if this as been done yet, but can you have a choice of character as in like resident evil, or any game where your heroin can be a male female and person or creature

or even give them character creator to devise their own person. as in a menu where character creator becomes part of the beginning of the game..

this is just throwing it out there kinda can you do anything like this? any insight would be good

cheers
s.b
an unquenchable thirst for knowledge of game creation!!!
Slaur3n
GameGuru TGC Backer
16
Years of Service
User Offline
Joined: 16th Sep 2008
Location: Norway
Posted: 7th Feb 2018 12:50
Hey i just tested the blood splat scripts, i cant get them to work. Something to do with Public preview?
Visit our FB site and like
https://www.facebook.com/crowhillstudiosofficial
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Feb 2018 19:12
Quote: "Hey i just tested the blood splat scripts, i cant get them to work. Something to do with Public preview?"

nope, they should work fine, just make sure you have the newest version
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 17th Feb 2018 04:49
Hey smallg I love the respawn scripts you have created. I've been using your ai_respawn and ai_respawner scripts but am curious how I would go about making it so they respawn where their start position is instead of where they died? I tried adding local variables in the enemies to set a start position data for x,y,z but when i try to call it from another script (the respawner) it doesnt seem to work

The enemies:
local startpos_x = GetEntityPositionX(e)
local startpos_y = GetEntityPositionY(e)
local startpos_z = GetEntityPositionZ(e)

Respawner:

x[a] = startpos_x[a]
y[a] = startpos_y[a]
z[a] = startpos_Z[a]

I'm assuming this doesnt work cause i cant just create a global variable like this? Wonder if there is a start position variable already in GG that i can read from?
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
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Feb 2018 08:23 Edited at: 17th Feb 2018 08:25
g_startpos = {}


g_startpos[e] = {x =GetEntityPositionX(e), y =GetEntityPositionY(e), z =GetEntityPositionZ(e) }


Rsepawner:

x[a], y[a], z[a] = g_startpos[a].x, g_startpos[a].y, g_startpos[a].z

That's one way of doing it.
Been there, done that, got all the T-Shirts!
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 17th Feb 2018 22:51 Edited at: 17th Feb 2018 22:59
oh that actually works ! Thanks for pointing me in the right direction
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
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Feb 2018 22:57 Edited at: 17th Feb 2018 23:02
Why do you sound (look?) surprised?

Personally I would have local variables and define functions to access them from other scripts, globals are really inefficient.

In the scripts that need to access the functions they can create local 'pointers' to the functions to help speed things up.

(e.g. local sin = math.sin, creates a local 'pointer' to the global function which is much faster to execute at runtime)

To really go the whole hog you can modularise the functions like I've done in the quatlib & utillib scripts, makes everything really fast.

Edited to add:
To solve the Y axis issue simply replace 'y' with 'GetTerrainHeight( x, z ) + 1', the + 1 is needed to ensure the model doesn't sink into the terrain before the Physics can get in and correct things. Discovered that the hard way when I had entities just dropping through the terrain!
Been there, done that, got all the T-Shirts!
PM
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 18th Feb 2018 14:42
looking at AmenMoses script in the above, i want to ask the question how would a script look if u want the ai to re spawn at their start position with their agro not on anymore after the player dies so that it is as if the level has restarted, also with player starting with original weapons and ammo amount when the game / level started.

Thank you.
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
ParadoxMan
7
Years of Service
User Offline
Joined: 22nd May 2017
Location:
Posted: 23rd Feb 2018 14:14
The script for appearance after death does not work. You can give another script to respawn!
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 26th Apr 2018 15:30 Edited at: 29th May 2019 18:24
New inventory script(s) - updated 26/05/2018 (edit: 29/05/2019)
allows multiple page drag and drop style inventory.
*make sure you keep the files in the inventory2 folder (place entire unzipped folder in scriptbank of course)*
- assign inventory.lua to an always active object
- assign all objects that can be added to the player's inventory inventory_pickup.lua
- make sure to include the object's purpose/use in its name - i.e. (medical) / (ammo) / (key) / (weapon)

weapons and keys require the extra scripts but you still apply inventory_pickup.lua to them, the weapon_pickup.lua and key_pickup.lua are just needed to sit inside your inventory2 folder (the game will automatically handle reading them).

adjust the settings in inventory.lua to suit your game.
uses the GG .bmp files from your models as the images displayed so if you want to adjust the icons you can do so in your model folders
the mouse image is found inside inventory2 folder (keep it there) but feel free to create your own.

left click and hold to drag items around.
right click to use items inside inventory.
left click and hold the top left corner to move the inventory around on screen (if enabled).
newer update video
(added tooltips and image deletion)



map file included for example set up but it should be very simple.

p.s. i did try to code it for the GG g_ system of variables and it "may" work with my auto save etc but i didn't test it and it's very likely it won't.... it definitely doesn't work for multiple levels in its current form as it requires the actual models exist so we can drop them out of the inventory, if GG ever gets a way to load models on the fly we can fix that.
p.p.s there may also be a small memory leak due to the icon images, it appears GG doesn't have a way to delete loaded images and i'm not sure if it handles checking for an image already being loaded or simply loads it again.
fixed (DeleteImage is simply not listed in the global.lua)

edit: quick update to make sure all unnecessary global variables are local, and added key demo to the .fpm (fixed the door requiring the wrong key 26/05/2018 - download the new .fpm)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 26th Apr 2018 17:17 Edited at: 26th Apr 2018 17:21
Sweet thanks G this was kinda what i was aiming at with my inventory so will play with this see if i can take some of the save parts etc from mine to see if i can get everything to carry over levels
What would be cool is to say have 3 bigger boxes and a meter down 1 side to add crafting into it e.g drop 2 items in the boxes the meter goes up for say 3 secs and crafts the item in box 3 (hmm wanders off into thought) lol
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 26th Apr 2018 18:00
it's different to yours because it's not a pure text based inventory - it won't carry over to the next level because it requires the model numbers and models from the first map as it uses the actual model for using the items and to drop onto the floor if you remove something from your inventory... these wouldn't be in the 2nd+ maps and i can't really expect people to put every single item into each map so it's better just say it's a hard limit for now and if ever GG gets the ability to create objects by code we can fix it then

crafting is not something i will be adding as that's definitely much more specific to each game and requires a lot of coding to work out specifics etc - as i'm sure you know - but it could definitely be added as a separate module with little editing of the inventory required (maybe just a little bit of an edit to the drop item code so we can detect if we're dropping into crafting slot or not)
shops and loot and such would be a nice addition too i guess.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
JPH-GAMES
3D Media Maker
9
Years of Service
User Offline
Joined: 13th Feb 2015
Location: Belgique
Posted: 26th Apr 2018 21:12
My god, what a beautiful work, thank you very much smallg

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 .
Flatlander
GameGuru Master
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 28th Apr 2018 02:20
I know you aren't taking requests; but, I'm so glad you went ahead and did this inventory script anyway. Thank you, 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
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 29th Apr 2018 23:49
Oh yeah i see i get you moving sprites with text might be pretty tricky lol. Still i like the inventory box layout idea m8 so maybe i can use fixed sprites with numbers and make a crafting screen for say window 3 etc. You've deffo given me some fresh ideas with the script so will be disecting and probebly breaking it a few times rofl
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 13th May 2018 10:06
simply awesome... cant wait to try it !! THANKS SO MUCH smallg !!
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 15th May 2018 21:36
ah yeah @smallg I have a question:

Would it be possible to add a simple tooltip function to items when you hover on them? Like a short explaination of what the item does?
Otherwise, its a great script! Thanks again!
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 16th May 2018 18:37
Quote: "ah yeah @smallg I have a question:

Would it be possible to add a simple tooltip function to items when you hover on them? Like a short explaination of what the item does?
Otherwise, its a great script! Thanks again!"

a good suggestion however i don't currently really have all the information so it wouldn't really work automatically.
i.e. currently in GG you restore HP or ammo by an amount set in the fpe but we don't have access to this value in lua.
so the best i could do is add a little tooltip that said something like "restores player HP" etc, or give the developer access to the tooltip so they can write their own description?
something to keep in mind for v2 though for sure
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 16th May 2018 18:53
yeah a simple sentence would be enough already

Alright great! I hope I dont miss it, when there is an update! Thanks again.
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 16th May 2018 19:09
ah yeah and I have something else too:

in my inventory script I added the line playsound(e,0) and playsound(e,1).

Now the inventory makes a "zip" sound when it gets open/closed. Its a small addition but it adds alot to the atmosphere I think
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 19th May 2018 14:12

coming soon, maybe?
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 19th May 2018 20:58
Now this is pretty cool!
Been there, done that, got all the T-Shirts!
PM
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 20th May 2018 12:53
omg... awesome smallg !!!
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 21st May 2018 17:08
Quote: "Now this is pretty cool!"

nothing you can't do with your eyes closed
tried it before in GG a few times but this is the first time with raycasting so it's much more like a "real" solution compared to any previous attempt.
wasn't a bad result for a few hours work but far too static for me, i would like to see more movement before i release it but i haven't had chance to continue working on this yet
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st May 2018 22:39
Hope you don't mind me sticking this here as your thread is sticky.

Function simply displays the specified text in a panel at the specified x,y,size. Works in different screen resolutions at text 'size' 1 to 3:



It's a bit rough and ready but seems to work ok.
Been there, done that, got all the T-Shirts!
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th May 2018 11:44 Edited at: 26th May 2018 12:31
Quote: "Hope you don't mind me sticking this here as your thread is sticky. "

not at all, added to the first post (note; to get it to work i needed to remove the 'local' from the function line)

version 1 of the team AI is done - no reason you can't use it as a basic ally script too if you put the AI as the same team as the player of course) but they won't follow the player or anything fancy
note* had to shorten the names of the variables used in the 'name' field as it reached the string limit so it might be a bit confusing at first when setting up your first character but an example of the name field can be found inside the script and i have commented the variables so you can see what they do (should still be pretty obvious).
- given the script an extra variable to ignore the player (nice for running around your map without getting shot).

setup
1. keep ai new folder and place it in your scriptbank folder
2. assign the new ai_soldier.lua (found inside ai new folder) to any AI
3. adjust the 'name' property of your AI to suit the script settings
4. assign sound1 and sound2 (gun shot and melee)

if you want to use other AI the fpe animations must match the uber soldier fpe
i.e.
anim0 = idle
anim1 = move
anim2 = melee
anim3 = hurt
anim4 = reload
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 26th May 2018 12:37
updated the inventory script to add tooltip display and delete the images
https://forum.game-guru.com/thread/207801?page=23#msg2599808
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Len the man
9
Years of Service
User Offline
Joined: 12th Jun 2015
Location:
Posted: 27th May 2018 15:38 Edited at: 27th May 2018 15:39
I tried to follow the instructions given in the comment for the new AI (ally / team) and added the AI name as instructed - team01 frng12 gdmg030 mdmg020 fdelay0350 clip012 reload1 but all the characters shoot at me (the player) instead of at other AI character bots.

I looked over the script, and from what little I know of scripting, it looks like it should work.

I'm not sure if I'm doing something wrong.

I am using GG v1.14, at this time, and I'm wondering if that might be the problem.

I have worked with the old Ally script and it works well. I just thought about giving this new one a try.
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 27th May 2018 17:15
are you saying they are all on team01 and you want them to fire at stock AI?
the AI only work with AI using my script so to get them to shoot at each other (but keep teams rather than all random) you need to change it to team01 or team02 etc for each character depending on how many different groups you want (they will not shoot at their own team so if you have them all on team01 then naturally they will ignore eachother)
you can set the player's team in the script where it says team[0] = #
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Len the man
9
Years of Service
User Offline
Joined: 12th Jun 2015
Location:
Posted: 28th May 2018 01:53
I used the new ai_soldier.lua that was just made for team & ally gaming, and was downloaded in the “ai new” folder... I just tested some “Character Creator” models, Fuse FBX2GG models, and changed the names to list them as team 01, and team 02... I also changed the script at line 24 to read team[0] = 1 or 01... Unfortunately I now come up with a couple of new error messages listed on line 187 or line 208 (pictured below). I changed line 24 back to team[0] = 0 and I still get the same error messages.

I also noticed that, with teams 1 and 2, the character models stand still with the magnum revolver pointed backwards at their own heads (see pictures below). I also checked the ai test.fpm download and all the soldiers in that map stood still while holding their pistols down at their side.

I changed back to a couple characters with the new ai script and a couple others as the old ai_soldier.lua and they all went back to shooting at the player... so that was confirmed...

I verified my GG download from Steam and restarted my PC and I still get the same error messages.

Attachments

Login to view attachments
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 28th May 2018 09:07
Which version of GG are you using as the error is for a core command, not one of mine, so you will only get that error if you're using a version from before the command was added?
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Slaur3n
GameGuru TGC Backer
16
Years of Service
User Offline
Joined: 16th Sep 2008
Location: Norway
Posted: 29th May 2018 18:25 Edited at: 29th May 2018 20:10
Smallg, brilliant inventory script!! How bout adding items you can collect and sell? Hotbar, where you can drag a weapon back to inventory for example.
Storage chests?
Visit our FB site and like
https://www.facebook.com/crowhillstudiosofficial
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 5th Jun 2018 18:29
Quote: "Smallg, brilliant inventory script!!
How bout adding items you can collect and sell?
Hotbar, where you can drag a weapon back to inventory for example.
Storage chests?"

some great suggestions and something i will add for a future version but not likely to come until i can make the script work (hassle-free) on multiple levels - i.e. after we get the ability to load objects via script
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Jun 2018 22:58 Edited at: 6th Jun 2018 19:32
My take on the 'notes' script. The script needs to explicitly load the images otherwise GG does not copy them over when creating a standalone.

Added utillib for those still using Jurassic era GG build.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM

Login to post a reply

Server time is: 2024-12-22 03:16:20
Your offset time is: 2024-12-22 03:16:20