Scripts / [STICKY] Smallg's free scripts

Author
Message
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 23rd May 2016 18:57
Thanks, Smallg. It's working now.
Julian
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 23rd May 2016 19:24
Thanks, SmallG. It works now! Works well too! I replaced PlaySound(e,1) with FireWeapon(e) and it seems to work OK.
Julian
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 23rd May 2016 23:37
Quote: "Thanks, SmallG. It works now! Works well too! I replaced PlaySound(e,1) with FireWeapon(e) and it seems to work OK."

yh, sorry about that
it's not a good idea to use FireWeapon(e) as this only works to target the player, that's why i use a workaround.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 24th May 2016 08:29
OK that's kind of fixed it for me, thanks smallg, the only issue I have now is that it doesn't seem to run as well as in your videos, when I use it they walk towards each other, stop, and stand there aiming their guns at each other for a couple of minutes, then one of them mysteriously dies, no sound no movement, nothing, if I get close when one's still alive it will attack me and act like a normal soldier ai though.

i7, NV960 4GB, 16GB memory, 2x 4TB Hybrid, Win10.
i5 , AMD 6770 1GB, 8GB memory, 512GB Generic SATAIII + 2TB Seagate Baracuda SATAIII, Win7.
i3, Radeon integrated graphics, 4GB memory, 512gB Generic SATAII, Win8.1.
Q6600, Intel integrated graphics, 2GB memory, 180GB Generic SATAII, WinXP.
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 24th May 2016 09:53
SmallG, you are a bit of a genius. This is a great first step into the world of allies. Do you plan to expand on this?
Julian
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th May 2016 18:46
Quote: "OK that's kind of fixed it for me, thanks smallg, the only issue I have now is that it doesn't seem to run as well as in your videos, when I use it they walk towards each other, stop, and stand there aiming their guns at each other for a couple of minutes, then one of them mysteriously dies, no sound no movement, nothing, if I get close when one's still alive it will attack me and act like a normal soldier ai though."

then it's working as it should, you just need to assign a gunshot sound to slot 1 for the characters.

Quote: "SmallG, you are a bit of a genius. This is a great first step into the world of allies. Do you plan to expand on this?"

not really, i will likely play around with it (or some form of it) as i always do but the idea was to allow others to expand it for themselves (though i appreciate the end quality of the videos was not great)
i will do a new 1 for how to make melee too maybe as that is pretty similar.
what else would you like to see added, perhaps some reloading? an attempt to find cover? calling for help?

@everyone if you have any specific tutorials/requests i can do please let me know, can't say when i will get time to do them but i'm normally able to help with smaller stuff quite quickly (and will try improve quality of course)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 24th May 2016 21:22
Quote: "then it's working as it should, you just need to assign a gunshot sound to slot 1 for the characters."


OK thanks, just seemed there was a lot more moving around and positioning in your videos than when I use the script.

i7, NV960 4GB, 16GB memory, 2x 4TB Hybrid, Win10.
i5 , AMD 6770 1GB, 8GB memory, 512GB Generic SATAIII + 2TB Seagate Baracuda SATAIII, Win7.
i3, Radeon integrated graphics, 4GB memory, 512gB Generic SATAII, Win8.1.
Q6600, Intel integrated graphics, 2GB memory, 180GB Generic SATAII, WinXP.
Wolverine
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location:
Posted: 25th May 2016 16:30
Hi Smallg

Thanks a lot for the ally script it works great
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 25th May 2016 22:03
Yes. Reloading and finding cover. Also, it would be cool if the enemy team attacked the player as well as his allies or at least reverted to the normal ai_soldier.lua when all allies were dead.
Julian
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 25th May 2016 22:21
the enemy team(s) do attack the player already but only if they detect him as they would anyone else in his team.
i will look into reloading and adding some movement to break up the stand and fire feel while in combat in the near future (cover might also be included depending on time)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 26th May 2016 08:33
I've got a request, it's along the lines of the angel script where they chase you but if you look directly at them they stop.

What I need is a script whereby a character will chase you slowly but if you turn and look directly at them (very narrow line of sight) they will disappear (if possible fade and disappear but I doubt that is possible) and reappears after say 10 seconds of not looking at them, so you only ever see them "out of the corner of your eye".

Also, if it's not too much trouble, the same thing, but the character doesn't follow, just stands there idling until you look directly at it, then disappears etc.

I don't have a clue about the chasing one, I tried editing a zombie script and it just messed up. I had a little more success with the second one, but couldn't get it to show again after.

i7, NV960 4GB, 16GB memory, 2x 4TB Hybrid, Win10.
i5 , AMD 6770 1GB, 8GB memory, 512GB Generic SATAIII + 2TB Seagate Baracuda SATAIII, Win7.
i3, Radeon integrated graphics, 4GB memory, 512gB Generic SATAII, Win8.1.
Q6600, Intel integrated graphics, 2GB memory, 180GB Generic SATAII, WinXP.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 28th May 2016 14:34
that's kinda what the angel script does already so you could quite easily adjust it to fit your needs but i did a new one anyway with your request in mind
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
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 28th May 2016 16:33 Edited at: 30th Nov 2019 11:51
added reloading and some extra movement to the team script.
not very happy with the movement but i couldnt get strafing to work (technically it worked but the animation wasn't always matching the way they were walking) so i settled for this, it does at least make them harder to hit?

edit; 30/11/2019 fixed shouting causes enemies to also run to the player
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
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 28th May 2016 17:55 Edited at: 3rd Jun 2016 09:33
Quote: "that's kinda what the angel script does already so you could quite easily adjust it to fit your needs but i did a new one anyway with your request in mind"


Yeah that's what I said. But I couldn't work out how to make it disappear and reappear after 10 seconds or so, I got it to disappear but because it disappeared it stopped running the script and didn't reappear again, that's mainly the part I was looking for help with

Thanks for looking into it for me, you're work is always great

i7, NV960 4GB, 16GB memory, 2x 4TB Hybrid, Win10.
i5 , AMD 6770 1GB, 8GB memory, 512GB Generic SATAIII + 2TB Seagate Baracuda SATAIII, Win7.
i3, Radeon integrated graphics, 4GB memory, 512gB Generic SATAII, Win8.1.
Q6600, Intel integrated graphics, 2GB memory, 180GB Generic SATAII, WinXP.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 2nd Jun 2016 23:59
as we now have a new update with global sounds i thought a nice conversation script would be a good addition
(of course you need to supply your own global sound files)
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
rolfy
17
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 3rd Jun 2016 07:56 Edited at: 3rd Jun 2016 07:57
Your scripting skills are awesome and only equaled by your generosity. Valued member badge is certainly earned and you are an asset to the community...well done bro' and thanks for all your generous contributions. I have personally learned a lot from you.
Isagabe
9
Years of Service
User Offline
Joined: 12th Sep 2014
Location:
Posted: 3rd Jun 2016 11:24
@rolfy absolutely right. Pure talent and generosity to boot. Thank you.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Jun 2016 14:58
Thanks, after thinking on my script a bit I realised it doesn't quite work as intended for multiple entities correctly, in its current form it only let's you create multiples that say the exact same thing due to the numbering of the globals (I.e. I touched on it in my video but it didn't click at the time), I will fix this when I get chance but naturally it will make the set up slightly more complicated (though I will do my best to keep it as simple as possible).

Also I plan to show how to add quest triggers and such so you can expand the script to more than just a conversation (though it will be up to you to create the quest of course)
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
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Jun 2016 20:48
fixed the conversation script to allow multiple characters with different dialogues.
short instructions is to now name your entities "conversation1" , "conversation2" etc, full instructions / demo in the video & script
p.s. also removed the death sound from the previous script, forgot it was there

(use the script here rather than the previous post for the update, i will keep the original post just in case someone finds it useful)
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
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 14th Jun 2016 21:13
how about a player inertia effect like on ice or to give more realistic decel in a vehicle?
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Jun 2016 18:38
script for disabling and re-enabling weapons on entering / leaving a zone (auto swaps back to previous weapon)
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
Kalle801
10
Years of Service
User Offline
Joined: 8th Jan 2014
Location: Germany
Posted: 15th Jun 2016 18:48 Edited at: 15th Jun 2016 19:19
Exactly what i wanted to do. mine is not like urs but almost. Thank you @smallg

Edit: Maybe you got this script: https://www.tgcstore.net/product/26017 If so, its completely bugged for me. If it is bugged for you too, maybe you could fix it?

The creator of this script is offline all the time.

Sicne i purchased this script i try to fix this script my self and learning lua but im at the very start to learn it.

hmm some of these code lines are not in the global.lua file. How would i be able to create this if the code is not in global.lua?
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 15th Jun 2016 18:59
Already added to the lib, well done mate!!!
I agree about this wonderfull boy.
Dunno why this thread is not already sticky.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Jun 2016 20:30 Edited at: 15th Jun 2016 21:08
Quote: "Maybe you got this script: https://www.tgcstore.net/product/26017 If so, its completely bugged for me. If it is bugged for you too, maybe you could fix it?"

can you tell me what is bugged on it? i could fix it but then i can't post it anyway so

had a request to update the vehicle script with the "gunner" (term used loosely) so here it is.

edit, once the g_PlayerAngX issue gets fixed i will update the script to turn the player more in line with the vehicle too.
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
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 18th Jun 2016 18:18 Edited at: 18th Jun 2016 18:18
The last Team ai script seems to be crashing now ?
works with one soldier but when you attach to team 2 its failing with this ...

The only person ever to get all his work done by "Friday" was Robinson Crusoe..

Attachments

Login to view attachments
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 18th Jun 2016 20:46 Edited at: 18th Jun 2016 20:47
ok fixed (or just add the extra functions from the bottom of the script attached in the link to yours)
https://forum.game-guru.com/thread/207801?page=15#msg2550158
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
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 18th Jun 2016 22:24 Edited at: 19th Jun 2016 19:27
basic inventory script, curious what items people feel need to be useable via the inventory so i can add those?
currently have keys, ammo and health packs (weapons likely wont be added as there's not really a quick way to un-equip a weapon?)
easily set the quantity to add via the name property (also automatically links the icon image via the name)
custom weight limits via entity strength stat so you can easily control how much the player can carry
custom script for doors so it tells you which key it needs and removes key from inventory once unlocked
scroll list of inventory with mouse wheel and highlight an item with the mouse cursor (and use items via left click)

doesnt support multiple levels yet unfortunately due to the save/load system not saving arrays but if ever that gets updated i will add it.
*video will come later as i don't have time to upload it now*

scripts will be uploaded once the settings have been double checked for custom placements etc and when i get some feedback on items.
(you will need to provide your own icons/images of course)

edit;
reworked the door and key system so it's a lot better on inventory space.


edit2

setup; (see pictures)
1. create folder in scriptbank\images\inventory
1.a. create .png files to act as thumbnail icons for the inventory (name these exactly as you want the prompt to appear on screen - capital letters etc)
*note all items in the inventory MUST have an icon or it will crash*
1.b. create a cursor.png file to act as the mouse cursor while using the inventory screen
2. place a static = no and always active = yes item to act as the inventory.lua script holder
2.a. assign a sound for opening & closing the inventory (slot0 = open, slot1 = close)
3. place static = no items with inv_gen_item.lua
3.a. name them in the properties EXACTLY as you named the related .png file in step 1.a. AND add a comma , followed by a value for the quantity
*in the case of ammo you will need to update both the quantity field in the properties panel and add it to the name as above*
3.b. set their strength to the weight of the item (this value will act as a limit for how many items the player can carry, create your own weight values)
3.c. assign the sounds to for picking up the items and using the items (slot0 is used for picking up ammo and keys, slot1 for picking up anything else - this is because items such as health already use slot0 for their default sound --- the free slot will then become the use sound)
4. if you have any keys then assign the respective doors inv_door.lua copy in the name of the key exactly (remember to include the , and the quantity) into the 'usekey' field of the door like normal
4.a. copy the name of the key (without the , and the quantity) into the name of the door so that the prompt will show which key it requires.

ingame;
press i during game to toggle the inventory.
keys must be examined (clicked) before they can be used to open doors, they will automatically be removed once they have unlocked the last door they are used for.
*note there is currently no limit on HP or ammo usage*
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
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 19th Jun 2016 01:04
Quote: "ok fixed (or just add the extra functions from the bottom of the script attached in the link to yours"


Thanks Smallg your awesome ....
first it just ignored me so I had a quick look and saw this ... function team2_ai_init_name(e,name)
I removed the "2" on team and now its great again
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 19th Jun 2016 20:35 Edited at: 19th Jun 2016 20:37
@sync yes, sorry, i uploaded the wrong file, fixed with the AI that actually reload now

updated the post above to release the inventory scripts.

also updated the conversation script so you can now have subtitles and can press e to skip through any lines you so wish (sound and subtitles) while talking to the characters
same instructions as before (https://forum.game-guru.com/thread/207801?page=15#msg2550652) but basically name the characters conversation1, conversation2 etc
then create and link your global sound files and now include any subtitles below it (use mine as a guide)
e.g. to add subtitles for global sound 1 you would use
subtitle[1] = "Hello there adventurer"
to create subtitles on more than 1 line you would use something like this (only really supports 3 lines unless you want to move the text around yourself), for longer speeches it's best to split the audio into multiple files.
subtitle[1] = {}
subtitle[1][1] = "What do you mean Ogres can't speak?"
subtitle[1][2] = "I'm talking right now aren't I?"
subtitle[1][3] = "Well I am a mighty Hero!"
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
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 20th Jun 2016 01:10
@smallg

Thats the best version yet !! ...I did get a "function" error initially you may want to edit on the download .....sorry
Its an extra " f " as shown below ..... After removing it the script is perfect ... Total Chaos on the battlefield and so much fun !!
If I had a " Scripting Jedi " badge you would be awarded it

--------------------------------------------------------------------------------------------------------------------------
end

f
function RotateToEntity(e,v)
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Isagabe
9
Years of Service
User Offline
Joined: 12th Sep 2014
Location:
Posted: 20th Jun 2016 04:32
Very cool smallg. Thank you as ever.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Jun 2016 18:33
autosave on changing level.
added a small bit of code to automatically save the game into slot 8 when you trigger the winzone so that if - like me - you don't remember to save your games very often and it crashes while loading the next level you won't lose all your progress.


apply it to the winzone like you would the normal winzone.lua
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
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 24th Jun 2016 21:03
Great!!! thanks for share mate.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 24th Jun 2016 21:15
Glad I inspired you smallg, good work

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 25th Jun 2016 10:13 Edited at: 25th Jun 2016 10:14
Thinking of making this one sticky as it really has an incredible wealth of scripts and Smallg's Knowledge
Should I rename it " Smallg's Example thread " or is everyone used to it as it is ?
Up to you Smallg ?
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 25th Jun 2016 10:36
Quote: "Thinking of making this one sticky as it really has an incredible wealth of scripts and Smallg's Knowledge
Should I rename it " Smallg's Example thread " or is everyone used to it as it is ?
Up to you Smallg ?"

why wasn't it stickied years ago? :p

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 25th Jun 2016 17:24
Quote: "why wasn't it stickied years ago? :p"


So many forms to fill out
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 25th Jun 2016 19:55
maybe "Smallg's free scripts" would be a good name.
sticky is welcome but not essential, i always try to keep the thread active anyway, thanks synchromesh
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 26th Jun 2016 16:57 Edited at: 27th Jun 2016 16:34
For those who do not know, I'll share a trick that will help you keep smallg's code organized, sorted, categorized, and at hand, in Notepad++ .
Download folder and unzip withing your scriptbank folder.
Folder contain all the smallg's LUA code, except WIP ones.
Files are categorized and sorted like smallg does, in their main post.

In this video I explain how to.



Only you have to make sure to keep this folder updated.
hth

Edit: [STICKY] Smallg's free scripts -- Nice one.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

Attachments

Login to view attachments
PM
Isagabe
9
Years of Service
User Offline
Joined: 12th Sep 2014
Location:
Posted: 28th Jun 2016 17:25
Nice sticky. Well deserved. Thanks for the tip 3com. Very helpful.
WertesGroupStudio
7
Years of Service
User Offline
Joined: 30th Jun 2016
Location:
Posted: 5th Jul 2016 22:02
Hi everyone !
I've added some very little features to Smallgrey Team AI Script
3 files each content some features.
Firstly i've added PlayCharacterSound // CharacterSoundSet to make AI more realistic (male, female, yourset)

Each files inherit contents
● Team_ai : Improvement to standard script with CharacterSoundSet // No weapon aiming if no war.
● Team_ai_nofollow : Normally if you press E all ally will come, with this script they will not follow you but still against enemies.
● Team_ai_run : Will run to waypoints with weapon aiming and they will not loop path.

Now is there any way to replace a "fake shooting" to "FireWeapon" like ai_soldier ?

Hope i helped,
WGS

Attachments

Login to view attachments
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 7th Jul 2016 12:16
Hi Smallg, i'm looking for a small, reduced AI script, and an adjustment to one of your own scripts, if you don't mind me asking mate.

1. Reduced AI: Basically I'm after a very basic civilian script that, all I need it to do is for the character to stand there in idle until the player gets within a certain distance, then it should turn and run along a waypoint, once it reaches the end of the waypoint it should despawn.

2. You Inventory Script: Could you add a couple of collectables to it, specifically the collectables from Tarkus's free thirsty and hungry scripts here.

drink00.lua


and

hunger00.lua


I'd be very grateful if you could do these for me, I have some big plans for my current WIP

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Jul 2016 19:17 Edited at: 8th Jul 2016 21:01
#1 done for you belidos

edit; #2 done too (but shouldnt the food and the drink reduce the value rather than resetting it back to 0? for now i have just copied what the original script did but if you want me to change it let me know)
name the items "food" or "drink" in the name as the usual inventory items (remember to include an image and the quantity)
edit2 changed inventory.lua to reduce the thirst and hunger values by the weight amount (their strength) rather than back to 0
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
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 8th Jul 2016 19:55
Awesome, thanks smallg.

The originals do reset it to 0, but it would be great if you could change them to just reduce it a bit, that would make it a lot more realistic.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 8th Jul 2016 20:46
Just tested them, the prowler script works perfectly, great job.

Unfortunately the drink and food ones don't seem to work, they collect fine, and go to the backpack, but when you click on them they don't reduce the thirst or hunger.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Jul 2016 20:56 Edited at: 8th Jul 2016 21:02
they do as i tested it, can you confirm the global script controlling thirst and hunger uses the same variables?
thirsty and hungry
perhaps you have changed them to g_thirsty?

edited the previous post
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 8th Jul 2016 21:03 Edited at: 8th Jul 2016 21:09
ah crap yeah, I changed them to globals, which lines do I need to change in the new scripts?

EDIT: OK I've found them, they work perfect now.

Again, thank you very much for this, it's going to make a huge difference to my WIP, you're a genius mate.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Jul 2016 18:55
by request
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
lauranoakesleo66
8
Years of Service
User Offline
Joined: 30th Jan 2016
Playing:
Posted: 13th Jul 2016 09:59
Thank you Smallg, very much appreciated.
PM
Seabeeassassin
7
Years of Service
User Offline
Joined: 13th Jul 2016
Location: United States
Posted: 26th Jul 2016 00:11
Hello everyone, newbie here. I was wondering is it possible to set a currency system using a lua script. What I have done is used smallg's shop.lua, loot_for_enemies.lua and loot_for_enemies_control.lua. I then made show_money.lua, money_100.lua, money_500.lua and money_2500.lua. Then I went and changed the entities .fpe file aimain to money_xxx.lua for the entities I was using as money. This works but when I change the entity lua in game to loot_for_enemies.lua everything works but adding the money to my money. I get the notification saying I've collected it and it plays a sound and disappears but no money added. Also if I go in and change loot_for_enemies.lua
elseif loot_type[e] == "collected" then
Collected(e) to
elseif loot_type[e] == "money" then
money = money + 100(e)
it works once but the second time I pick up an entity with money tag attached to it gg freezes on me. Also I tried adding different values like
elseif loot_type[e] == "money100" then
money = money + 100(e)
elseif loot_type[e] == "money500" then
money = money + 500(e)
nothing happens. I can kill 20 enemies and get no loot. I hope I explained this for all to understand and thank you for any help

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-29 10:53:31
Your offset time is: 2024-03-29 10:53:31