Scripts / [STICKY] Smallg's free scripts

Author
Message
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 1st Jan 2017 14:35
The binoculars require an image so that you get the overlay effect of using them, at the top of the script is the location and name of the image, you will need to supply your own (you can use the one in the original binocular script as a quick test, link in page one).

@warlock and everyone: happy new year too

I may have some free time this week but don't currently have any new & interesting scripts to release so if anyone has anything they want to see added please let me know. Otherwise I'll be happily spending my time in AGK
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: 1st Jan 2017 14:53
error 501 is an image with an illegal number ... check that all the images you use in the script are named properly and located in the right folders.

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.
Unspokenbond
7
Years of Service
User Offline
Joined: 28th Nov 2016
Playing: GameGuru
Posted: 1st Jan 2017 16:25
Happy New Year gents!

smallg- I've got one that'd be wicked cool and lot of use if you're interested sir. A 'wanted level' system. Like 5 star wanted rating that climbs as you shoot or hurt people and it automatically lowers if you hide and not hurt anyone? Thoughts?
PM
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 1st Jan 2017 19:04
Thanks for gang member and civillian2 scripts! Fantastic!
PM
AceRimmer
Reviewed GameGuru on Steam
9
Years of Service
User Offline
Joined: 28th Feb 2015
Playing: classic British heavy metal mostly
Posted: 2nd Jan 2017 18:47 Edited at: 2nd Jan 2017 19:22
Quote: "I may have some free time this week but don't currently have any new & interesting scripts to release so if anyone has anything they want to see added please let me know. Otherwise I'll be happily spending my time in AGK"


ok!
I have actually managed to make a couple of scripts that work...... smug mode it's been a long slog, but finally something clicked. Thanks smallg for all the explanations on this script forum, some of it has started to sink in Help with these below would be a nice hand up in understanding Lua for me.

Need a bit of help upgrading some scripts I have working already.

What it does now: Plays a sound randomly in a zone.
What I need to know is how to add further sounds, or preferably more slots to a zone marker, to play more random sounds by allocating them to slot1,2,3 etc. (so that different sounds are played randomly)




also I'd like a similar function in a script which plays sounds in a random order, waiting for one sound to finish before playing the next. eg. "shuffles" the sounds.
OR.... I reckon it'd work with (say 5) sounds. with < math.random(1,5) > and < if mynumRnd ==1 then could I point it to a sound folder with sounds named 1 to 5 instead of pointing it to the entity sound slot? But I can't figure this out yet.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Jan 2017 01:24
Quote: "What I need to know is how to add further sounds, or preferably more slots to a zone marker, to play more random sounds by allocating them to slot1,2,3 etc"

the only way to get extra sounds is either via the global sounds system (but you would need to define the path in the script, though technically gives unlimited sounds) or to attach them to another object and play them from that with a script to link the 2 objects (limited to about 7 slots? 2 from zone + 5 from object i think).
i'll put together the latter version for you soon.

Quote: "smallg- I've got one that'd be wicked cool and lot of use if you're interested sir. A 'wanted level' system. Like 5 star wanted rating that climbs as you shoot or hurt people and it automatically lowers if you hide and not hurt anyone? Thoughts?"

technically not a lot different to the exp system in it's most basic form, just add/increase a wanted level variable inside the exit(e) part of the AI script(s)... if you want to get more technical then you could have it increase the longer you're in combat or when you hurt them and not just for kills etc but the real question is how do you envisage this then effecting the "police"? it needs a whole new AI script to control their behaviour based on the different wanted levels.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Unspokenbond
7
Years of Service
User Offline
Joined: 28th Nov 2016
Playing: GameGuru
Posted: 3rd Jan 2017 01:46
oh snap - totally spaced on the 'police' aspect of things. Yes, it would definitely need its own ai script to handle bad guys being bad lol
Still learning LUA but 'attempting' to build my first game
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Jan 2017 16:20
random sound picker.
randomsoundinzonezone.lua goes to the actual zone
randomsoundinzoneobject.lua goes to a nearby object - best to put it in the middle of the zone (on the marker) so that the sound will still have the correct fading etc
give both object and zone the same unique name and assign the sounds to the object (the zone sound is not used), adjusting the object HP will make the sounds more or less likely to play.
p.s. the object used will not be visible in game.
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
AceRimmer
Reviewed GameGuru on Steam
9
Years of Service
User Offline
Joined: 28th Feb 2015
Playing: classic British heavy metal mostly
Posted: 3rd Jan 2017 19:09 Edited at: 4th Jan 2017 02:22
random sounds scripts - brilliant thanks!!!
going to make very good use of these.

couple of simple questions about the zone script

Query 1
Sounds play after I leave the zone. (entering the zone triggers the script fine)
So I have tried adding various bits to the script to stop the sounds playing when I leave the zone, however, apart from syntax errors with our old friend <end> the results have ranged from a global error to the sounds not playing at all. I'm maybe putting it in the wrong place or I am trying to call the wrong function?

I added a bit
else
StopSounds(assigned_object[e])
took ages, trial and error, it turned out i needed stopsounds (plural) not stopsound (singular) but it isn't referenced in global Lua, it was a hunch in the end.


Just one issue:
if playing longer sound files (eg a music track in the mix) the sounds will play over the top of one another, so I'm wondering if the <PlaySoundIfSilent> command applies to all sound slots in the entity, or if it only checks one random slot? as a total noob to Lua this is what the code appears to mean to me (but I am probably way off the mark):

eg
PlaySoundIfSilent(assigned_object[e],math.random(0,4)) << choose a random slot from 0 to 4, and if that one slot is silent play a sound in that one regardless of whether the others are silent?
its like deja-vu, but all over again

Attachments

Login to view attachments
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 4th Jan 2017 10:59
Hi @smallg, thanks for all of your hard work in this very exhaustive thread - you are the man!

I was trying to locate your vehicle script to learn from and modify for a car model I made, but I can't locate it, and the link on the Opening Post doesn't seam to point to it, could you please direct me to it?

Many thanks.

Reliquia....
Intel(R) Core(TM) i3-4160 @ 3,60GHz. 8GB Ram. NVidia GeForce GTX 750. Acer 24" Monitors x 2 @ 1920 x 1080. Windows 10 Pro 64-bit.
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 4th Jan 2017 11:14
Quote: "I was trying to locate your vehicle script to learn from and modify for a car model I made, but I can't locate it, and the link on the Opening Post doesn't seam to point to it, could you please direct me to it?"


Do you mean this one?

https://forum.game-guru.com/thread/207801?page=15#msg2551879

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: 4th Jan 2017 11:45
@ace yh that command only checks the sound in question, there's no way to detect if a normal sound is playing or not unfortunately (only added for global sounds) other than assigning lengths ourselves - which makes the script much less friendly.
i could make it stop the last sound automatically but the script is best used to play sounds of about the same length and then you just increase the HP of the object to around the length of the longest sound file x 10 (so 2s = 20hp, 60.5s = 65hp etc)

if you want this for something specific and are happy to adjust the script settings more precisely then we can do that too (but you would need to do it for each zone) or if the engine gets more sound commands then we can do more with them at a later date.

@reliquia i think i did a taxi once and a racing game but i can't remember if they ever got to a worthwhile state or not, if that's what you're looking for perhaps this might help
https://forum.game-guru.com/thread/216557#msg2561238
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 4th Jan 2017 20:18
What we really need here is all of these scripts compiled into a usable library that can be added as a module or called in the globals.

That would be such a heavy undertaking though
AceRimmer
Reviewed GameGuru on Steam
9
Years of Service
User Offline
Joined: 28th Feb 2015
Playing: classic British heavy metal mostly
Posted: 4th Jan 2017 23:06
@smallg thanks for the info, looks like I'm getting to understand Lua a little bit, I can work with it now you've confirmed how the sound works. It's a really useful script. much appreciated.
@ Boltactiongaming I thing it has been compiled into a library by someone, but I can't remember where I saw that.
its like deja-vu, but all over again
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 16th Jan 2017 03:15
Thanks smallg! I got the binocular airstrike to work. Yes I was missing an image. Thank You! I want to know if its possible? To use your vehicle_gunner script with a car that is suppose to hover/float. (Free Green Car in store) I'm trying to say can you make a car,spaceship fly/float/hover by modifying the vehicle_gunner script? And to be able to add motor running effects. That would be so amazing! I been working on a sci fi game for quite some time now. And would love to be able to drive/fly in it. I looked around on the forum and haven't found any scripts that can perform that. Thanks Again
Jim C
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 16th Jan 2017 10:08
Would that be including the ability to fly up or is the car stuck at a set height?

I imagine it would be possible to fake the set height by simply setting the model origin below the model by some distance.

I will look at scripting this when I get time though, quite like the idea of having it slowly hover up when you first get in.

Also what do you mean by motor running effects? Sound?
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: 16th Jan 2017 15:00
I've been tinkering with your old vehicle script and still find it judders quite badly, is there a way to stop this now? Same effect with physics on and off whereas before it didn't happen with them off. :/ Any working vehicle /aircraft script would be a massive help G preferably with up and down
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
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 16th Jan 2017 17:32
Press the "e" key. Makes the craft hover up when you get in. Then you would be above the terrain. Then the player would control the car/craft by using the vehicle_gunner keys to make it go forward "w" back "s" Left "a" and right "d". Then "e" to bring the car/craft back down. Sorry, yes I meant sound effects. Thanks Again Smallg.
Jim C
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 16th Jan 2017 20:32 Edited at: 17th Jan 2017 17:33
OO ive hit a wall again lol maybe you can point out what im doing wrong here i have a set of scripts to buy schematics to build things e.g base upgrades, medipacks etc problem is when i buy a schematic from 1 terminal i then cannot buy from another? all terminals are working but they wont add multiple schematics = they dont show up in the inventory just the first one.

Heres my inventory script



and heres one of the terminal scripts which are all the same just edited for different items



Can you show me where im going wrong here please?
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
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 17th Jan 2017 18:47 Edited at: 17th Jan 2017 19:21
@honkeyboy you need to reset the pressed check or it'll still be counted as you're holding the 'e' key, therefore not allowing you to buy another.
also you should check money is above the price, not 0 (otherwise it's possible they would be able to get one on the cheap )



for the flickering, im not sure, i dont get it with the vehicle gunner script but i believe it's a collision issue, not much to be done about it if you want collision on, the player will fight the object for it's space, best to remove collision or look into the hud.x method (like the jetpack).

as for spaceship flight, i'll look into that more when i get time, i remember we did one before but i think that was only 2D right?

@blacknyt see attachment
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: 17th Jan 2017 19:00 Edited at: 17th Jan 2017 19:11
lol that was just for testing .Thanks G m8 your a star Edit: brilliant works sweet
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
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 20th Jan 2017 00:58
"Smallg!" You are the script GOD! "Thank You!" Wow I'm blown away! Now my game is starting to look up. After 2000 hrs. put in. That script does exactly what I wanted. We need physics in this engine. So we can drive and fly. "BADLY" It opens up a larger more attractive game engine. This game is going to be a Sci Fi dream come true for me. Thanks to you. And Lee. And everyone else in these forums. After spending some time with G.G. I noticed I'd rather make games than play them. Most of the stuff I want in my game I have to find a work around for it. Because We all know G.G. is still only a beta. So making a game for me any way's takes a lot longer. I love game design! But, hate trying to script. No time to learn it. There is a lot of talented people here. I like to Thank them as well. Is there a link to show us how to use a hud with the jetpack script? Anyone? I would like to see how that works. THANKS Again ....p.s. (Which key do I press to fire the lasers?)
Jim C
Earthling45
8
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 23rd Jan 2017 10:02
Hi smallg, for the door it is best if i use door.lua and have collisionmode = 1 erased from the FPE.
These settings are best for the performance, the only small problem is of course the absence of collision while the door is open.
I wonder if it is possible to something similar like Rolfy's interactive pack with door.lua.
With that i mean that the door automatically closes the when the player moves away from the door.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 23rd Jan 2017 12:48 Edited at: 23rd Jan 2017 12:55
Quote: ""Smallg!" You are the script GOD! "Thank You!" Wow I'm blown away! Now my game is starting to look up. After 2000 hrs. put in. That script does exactly what I wanted. We need physics in this engine. So we can drive and fly. "BADLY" It opens up a larger more attractive game engine. This game is going to be a Sci Fi dream come true for me. Thanks to you. And Lee. And everyone else in these forums. After spending some time with G.G. I noticed I'd rather make games than play them. Most of the stuff I want in my game I have to find a work around for it. Because We all know G.G. is still only a beta. So making a game for me any way's takes a lot longer. I love game design! But, hate trying to script. No time to learn it. There is a lot of talented people here. I like to Thank them as well. Is there a link to show us how to use a hud with the jetpack script? Anyone? I would like to see how that works. THANKS Again ....p.s. (Which key do I press to fire the lasers?)"

great, it takes a lot more patience and time to make games but it's great when you have that idea in your head and see it come to life in your own game
for the jetpack, it's not a script but a model, i don't know a great deal about it but from my understanding it just sticks a model to the player, bit like the guns.
lasers are disabled due to battery limits, good old missiles were out of stock at the time of writing

Quote: "Hi smallg, for the door it is best if i use door.lua and have collisionmode = 1 erased from the FPE.
These settings are best for the performance, the only small problem is of course the absence of collision while the door is open.
I wonder if it is possible to something similar like Rolfy's interactive pack with door.lua.
With that i mean that the door automatically closes the when the player moves away from the door. "

i didn't know doors supported collision on the open doors but sure, give it a try and see what you get
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
Earthling45
8
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 23rd Jan 2017 15:16
Quote: "i didn't know doors supported collision on the open doors but sure, give it a try and see what you get"


Thanks, your script works really good

About the collision, no it is not supported it seems, with sb_door.lua it works but then i'm confronted with a massive drop in framerate.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 23rd Jan 2017 16:05
ah of course, because i switched collision off in the script.
this one works for the frame of the double doors (animated) from the stock but not the actual doors (when changing collisionmode to 1 in the fpe)
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: 23rd Jan 2017 16:12
Quote: "I've been tinkering with your old vehicle script and still find it judders quite badly, is there a way to stop this now? Same effect with physics on and off whereas before it didn't happen with them off. :/ Any working vehicle /aircraft script would be a massive help G preferably with up and down "

this seems much better if you turn always active = yes.

for flight i've been playing around with this today, not perfect but feel free to play around with it.

p.s. also removed the ability to get out mid-flight
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: 23rd Jan 2017 17:23 Edited at: 26th Jan 2017 12:24
Thanks G i'll play with that shame about the collision still not working :/ i did see you mentioned using a HUD how would i do that? I have been making up some HUD's either to add into "Galaxy" or maybe make a Mech style game. I have 8 images in all ranging from green in good health to red nearly destroyed, in banks of 2 so 2 green, 2 yellow, 2 orange, 2 red. the hud work with any weapon ATM, I'm currently trying to adapt Rolfy's helmet script to fit, but maybe it needs the Gsters Stamp on it
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
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 24th Jan 2017 14:35 Edited at: 24th Jan 2017 14:40
Quote: "this one should work better. (note there really isn't anything i can do about the pausing while they think about running away, that's just AI pathing)."


I have a few questions about civilian scripting, and maybe altering this civilian script.

1. If i wanted the civilian to turn to the player and for example activate a prompt when the character is close instead of running away, where would i put that prompt? and what would i need to remove to stop it running away?

2. If i wanted it to react differently to different variables, would there be an easier way than duplicating the script and adding if variable and else with changes to the script?

3. How would i slow the walking speed down?

4. How do i add line of sight at a set angle to the character?

Basically what i want to try to do is:

1. The character will patrol a waypoint very slowly (i want slow because its a security guard walking about behind a desk)
2. When you get close he tells you if you haven't got an appointment you have to leave.
3. After speaking to him the first time once you have left his range and returned his response changes slightly: A) Instead of distance he now uses a 45 degree line of sight, continuing to follow the waypoints, and B) When he spots you he tells you to get out and transports you to an ifused entity.

Basically what i want to try to do is, in my scene you have to get into a guys office, the first time you try to enter the guard will stop you and ask you to leave, but after that he will throw you out if he sees you, so you need to sneak past him without entering his line of sight.

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.
Mouaa
User Banned
Posted: 27th Jan 2017 00:13 Edited at: 27th Jan 2017 00:40
Hi SmallG,

Your carry_object script works great.
The object rotates with mouse moves on X, how to modify it to have the object rotating also when mouse moves on Y ?




My goal is to have custom weapons or character in front of camera.
Unspokenbond
7
Years of Service
User Offline
Joined: 28th Nov 2016
Playing: GameGuru
Posted: 28th Jan 2017 02:27
I'm trying to do the same as Belidos and have a guard with dialogue, etc. Would absolutely love some help as well
Still learning LUA but 'attempting' to build my first game
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 28th Jan 2017 11:29
Quote: "I'm trying to do the same as Belidos and have a guard with dialogue, etc. Would absolutely love some help as well "

this would be ok for the first part, the swap will just be an if statement to trigger the new state and then a new state with code to control his behaviour after the new state is triggered
https://forum.game-guru.com/thread/207801?page=16#msg2558343

Quote: "3. How would i slow the walking speed down?"

the script above uses the AI controls so you would slow him down by adjusting
, you may need to increase the animation speeds in the properties if you find they become too slow.

4. How do i add line of sight at a set angle to the character?
if you use
or
you can use the view angle and view range in the properties panel to adjust character vision

Quote: "The object rotates with mouse moves on X, how to modify it to have the object rotating also when mouse moves on Y ? "

it already rotates on Y (in GG) so i assume you mean X in GG (i.e. look up and down), this requires some advanced maths to make it 100% accurate, perhaps amenmoses has something in his library to help with that otherwise you can do it manually by knowing the distance and playing around with the rotation based on the player's current X angle.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 29th Jan 2017 07:51
Smallg, That spaceship script doesn't work for me. When I walk up to the ship it say's "Pilot the ship(E)" I hit (e) and nothing happens. I tried it many times with different ships. I don't get any pop ups. It just doesn't do anything. The video looks so Awesome. I used standard procedure with the script. Made it dynamic etc. And always active. Did I miss some instruction? Please help. I would Love to incorporate it in my game. I'm loving the vehicle gunner script. It rocks! Thanks
Jim C

Attachments

Login to view attachments
AuShadow
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 2nd Dec 2013
Location: Australia
Posted: 29th Jan 2017 11:18 Edited at: 29th Jan 2017 11:19
hey small G quick little problem im having after modifying your sniper script. Video explains it better and script posted below video. Any ideas on why he doesnt shoot or is because its inside the if statement and I just cant do it that way, thanks for any help here:



PC Specs: Windows 10 home 64-bit, Amd 7900 3gb DDR5 graphics, 8gb DDR3 Ram, Intel i7 3.4ghz
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Jan 2017 15:20 Edited at: 29th Jan 2017 15:22
Does anyone else have a problem with the flight script not working?
I'm not really sure what's wrong with it as it works for me and if you're getting the prompt then it is working for you at least to some extent, once you get in is there any text on top corner of the screen to show your speed?

@aushadow yh the fire weapon call can take longer than a frame to trigger as it has some internal checks so a timer is generally a bad idea... Also remember AI are set to a maximum range so make sure its always active and that you're not outside the guns range (1500).
If you want to delay the fire rate you can do this directly in the entity/characters properties rather than by script... That should fix it assuming the above conditions are met.

Edit, just watched the video, remove the timer and adjust the fire rate in his properties
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: 29th Jan 2017 16:37 Edited at: 29th Jan 2017 16:52
Did you all remember to copy the name into the if used field? works for me m8 np.
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
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Jan 2017 16:57
That's not necessary as it uses a custom position you can define in the script (using the ifused field is for the previous way of doing it but forces you to be placed at the origin point of the entity.
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: 30th Jan 2017 10:54 Edited at: 30th Jan 2017 10:56
Quote: "this would be ok for the first part, the swap will just be an if statement to trigger the new state and then a new state with code to control his behaviour after the new state is triggered
https://forum.game-guru.com/thread/207801?page=16#msg2558343"


Thanks SG, but that's the script i was talking about to start with, i was asking where and how i would make those changes. I'm not sure where to add an "if" to make it so that when you are visible it transports you to ifused.

I suppose i could just leave the AI alone and add to the and an if for visibility and transport, ie:



How would i make him stop following the waypoints and rotate to the player when visibility is triggered then return to walking when you're out of sight?

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 2nd Feb 2017 04:29
Smallg, I found out why I couldn't get the spaceship script to work. After hours and hours of breaking the spaceship script Lol. It doesn't like the radar script I was using. I deleted the radar(with the green bars) and Bang! It's working. The spaceship script is "AWESOME" Thank You! I want to be able to use sound effects. If that's possible? If it's to much? That's okay I understand. I could try, But I'm afraid of messing it up. Thanks again Smallg for another Amazing Script.
Jim C
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 2nd Feb 2017 08:54 Edited at: 2nd Feb 2017 14:10
Could you link me or send me the radar script and I'll see what the issue is between the 2?
I'll add some sound calls too sure, no worries
edit, added some sounds

@belidos here's a script for your guard too (note: will only work for one guy as i'm lazy).
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
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 3rd Feb 2017 01:43
Ok Smallg here are the .lua scripts I was using with the spaceship script. Including the green bars. Good Luck! And Thank You
Jim C

Attachments

Login to view attachments
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 3rd Feb 2017 08:12
Quote: "@belidos here's a script for your guard too (note: will only work for one guy as i'm lazy)."


Thanks very much smallg, you really didn't have to write it for me, just a few lines pointing out what needs changing and why would have been more than helpful.

P.S you are the opposite of lazy, you didn't have to do any of that for me

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
Wolverine
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location:
Posted: 5th Feb 2017 23:04
Hi Smallg

I was wondering if there was anyway of getting the Zombie crawler to jump on you when it is near you?
Also is there anyway of Decapitating or dismembering Zombies while you are fighting them with a sword?
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 6th Feb 2017 09:05 Edited at: 6th Feb 2017 09:06
Quote: "I was wondering if there was anyway of getting the Zombie crawler to jump on you when it is near you?"


It would need new animations added to them, animations on characters aren't controlled individually by the engine, they're created and recorded in a modelling program, added to the model, then the engine plays the animation on command, if there is no jump attack animation in the model, then you won't be able to do it in gameguru.

Quote: "Also is there anyway of Decapitating or dismembering Zombies while you are fighting them with a sword?"


Yes, kind of, with some trickery, in fact the script for it is right here in the thread you have posted in, it's listed on the first page as "cut zombies in half"

https://forum.game-guru.com/thread/207801?page=8#msg2517306


i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
Wolverine
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location:
Posted: 6th Feb 2017 16:58
Thx for the info Belidos I will try that.
PM
TechCo
User Banned
Posted: 7th Feb 2017 11:37
smallg can you make a script where is no health hud or number of health there is only weapon hud and number of weapons ammo that player got.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 7th Feb 2017 12:04 Edited at: 7th Feb 2017 16:59
Quote: "smallg can you make a script where is no health hud or number of health there is only weapon hud and number of weapons ammo that player got."


Here's one i posted very recently

https://forum.game-guru.com/thread/216400#msg2568925

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 7th Feb 2017 14:16
Hi SmallG or anyone that can help .... I have attached your " door_vertical.lua" script that works perfectly for my needs ...
I just wondered if you could add a sound effect function when the door opens or closes I can point it to some cool effects
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: 7th Feb 2017 16:45 Edited at: 7th Feb 2017 16:56
try this (sound0 = open, sound1 = close)

@Blacknyt46 i have no problem with using the radar you gave and the spaceship at the same time, are you sure you're using WASD to move the ship?
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: 7th Feb 2017 17:21
PERFECT !!!

Thanks Smallg ...Your the man ..
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM

Login to post a reply

Server time is: 2024-09-21 01:56:22
Your offset time is: 2024-09-21 01:56:22