Scripts / Gun turrets

Author
Message
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 16th May 2018 16:51
Can't seem to get the gun turrets script to work since the update. Not sure if I am doing something wrong, I place the scripts as directed but they don't move or shoot. Any help would be great!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 16th May 2018 18:58
Which gun turrets script?
Been there, done that, got all the T-Shirts!
PM
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 16th May 2018 19:29
Your great script AmenMoses

https://forum.game-guru.com/thread/218176
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 16th May 2018 20:02
Ah, well the quatlib has been incorporated into scriptbank since then and has been 'fixed' so those old scripts will probably not work too well anymore. You could put the old quatlib in a sub directory and change the scripts to include that one instead.

I'm finding that the whacky racer script has some problems as well so am having to rewrite it.
Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 16th May 2018 23:16 Edited at: 16th May 2018 23:19
I've been reinventing the trap scripts for GG whacky racers just need to redo some of the models
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
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 19th May 2018 20:18
Thanks, I will give that a try.
PM
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 8th Jun 2018 17:14
Gave that a try but I still can't get it to work. Could be an error on my part. Disappointing though as that was a great script!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 8th Jun 2018 17:50
Could you post the script(s) that you are trying to fix here, there are quite a few on that thread so I'm not sure which ones you have used.


Oh and which turrets are you using, there are a few of those as well!
Been there, done that, got all the T-Shirts!
PM
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 10th Jun 2018 18:43
Ok. Gun turrets posted on June 19th 2017 by GraPhiX and your
updated scripts posted June 28th 2017. I had them working before the update.

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Jun 2018 21:35
Try these:

Remember to delete your old .dbo files so the new .x files get applied.

If this works for you I'll change the other .x files as well. Not sure how you ever got it working though!
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 10th Jun 2018 22:07
whats wrong with the models? I am in the process of upgrading them to PBR
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
Laptop - Helios 300 Predator - i7 7700HQ - 32GB - Nvidia GTX1060 6GB - 525GB M2 - 500 SSD - 17.3" IPS LED Panel - Windows 10 Pro x64
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Jun 2018 22:13 Edited at: 10th Jun 2018 22:17
Hi G,

I just centred them is all, and rotated them to 'forward' orientation.

I did the same for the ones I originally made the videos with which is why I'm surprised these ones ever worked with my scripts!


I actually need to re-write those scripts at some point, they still do things the 'old' way and could be improved to work with scaled versions of the models now that the Lua commands are available to do that.
Been there, done that, got all the T-Shirts!
PM
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 11th Jun 2018 17:41 Edited at: 11th Jun 2018 17:59
AmenMoses it almost works! Gun turrets and radar dish rotate to player and damaged parts appear when turrets are destroyed. The only problem is when I add decals for shooting I get this error:
PM
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 11th Jun 2018 17:42
I don't know why the picture didn't attach. The error is:

scriptbank\gun turret\turret_base.lua:146:attempt to call field 'Rotate3D' (a nil value)

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 11th Jun 2018 20:32
Try this one.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 11th Jun 2018 21:20
Thank you so much for your help! Getting closer. The gun turrets rotate to player and shoot! If I move to a different location however the dish and guns still rotate to player but don't shoot again or shoot intermittently.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 11th Jun 2018 21:30 Edited at: 11th Jun 2018 21:36
How many shot decals are you using?

Ah, the script you were originally using has a set shot time of half a second, in the new one it is controlled by a setting at the top of the script, try setting the gunCoolTime to a lower value.
Been there, done that, got all the T-Shirts!
PM
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 12th Jun 2018 16:35
AmenMoses the script works perfectly! When setting up the turret guns and decals this morning I realized that I hadn't made the decals "always active" . Now it works fine even without adjusting the gunCoolTime. Great to have this script back. Thank you again!
PM

Login to post a reply

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