Scripts / [SOLVED] mg nest

Author
Message
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 1st Feb 2019 03:34
hallo, i looking for a static mg script like this
https://www.youtube.com/watch?v=I1iZDyOglGM
unfortunely i cant find the founder of this script, tis video is recorded 9 years ago : (

The author of this post has marked a post as an answer.

Go to answer
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 2nd Feb 2019 22:44
Nobody?
I tried to make this thinks:
-modyfied the fpe from my model to "isweapon-yes" and set location to modern\uzi
-in the editor i changed the default.lua to weapon.lua
It doesnt work

Attachments

Login to view attachments
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 3rd Feb 2019 22:23
I allredy have the HUD.x with firespot but
the weapon is pickable, not static
and the "view" is from side not from behind(must be still zoomed)
CAN ANYONE HELP ME PLEASE??/

Attachments

Login to view attachments
PM
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 3rd Feb 2019 22:43
I looked around in the forum and there is no such script for a static gun. You actually need to script it yourself or search one who do it for you.
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Feb 2019 23:24
Patience grasshopper, Rome wasn't built in a day.

Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 4th Feb 2019 00:25 Edited at: 4th Feb 2019 00:34
Maybe i ask someone to make it for money?
Atleast a script that "freeze" the player(cannot move, only shot) who tooked the mg so he cant walking around with it?I tried this

Added to and entity and set always active but doesnt work, and even if it works the player would be frozen everytime he press "e" key and not only if take weapon.
this one also not working

Tried also to set it into global lua but the player is allways frozen from the beginning of the game.
And how to make the weapon allways zoomed?i mean all the time without pressing right mouse.
BTW i found a fpsc script to drop\release weapon, is scripting for fpsc and gg much different?
Can this script be modified for GG?

greeting
PM
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 4th Feb 2019 09:18
You should learn the basics of LUA scripting in GG first, before you write some lines:
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770

GG and FPSC has completely different scripting syntax. FPSC use FPI and GG use LUA.

Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 4th Feb 2019 22:53
Please have a little patience as AmenMoses said Rome was not built in a day, a good model cannot be rushed
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
Various Tutorials by me
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Feb 2019 00:19 Edited at: 5th Feb 2019 00:20
Why oh why am I surprised! GG yet again has to be flipping awkward. I thought I had it sussed, had the plan all ready to implement, simple I thought, put down the weapon as a static entity, then press E to use it. Set the player position and angle relative to the static weapon and switch it for a 'real' weapon and then blam away to your hearts content.

Nope, the static weapon models origin and angle are set for placement on the ground and share no relation to the angles of the 'real' weapon models (two completely different .X files in fact) so now I have to stick it in Fragmotion and fiddle around, second problem is that they are scaled differently as well so the gun spec offsets don't match the offsets for the static model, Grrrr. Oh and to cap it all off I can't (yet) figure out how to switch between the static model and the 'real' weapon seamlessly, i.e. if the player doesn't actually have the weapon, as in is already carrying it, I can't get it to switch so you end up with the HUD for the weapon showing but no actual weapon in hand.

I'll sleep on it and have another go tomorrow when I feel less like chucking my keyboard (that doesn't work properly anyway) through the bloody monitor!
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 5th Feb 2019 04:51
Poor monitor! So it's a "turret" weapon? An emplacement gun the player operates?
Really good idea actually. Lots of uses.
If it was able to travel, (flying fortress dogfights...!) then we getting into real stuff!
Woops, London wasn't built in a day either...
Too bad if every model had to be meticulously modified.
No way to just make the static (or dynamic if necessary) object hidden- right? Then just stand there and shoot?
Player would have to be carrying that gun? I guess that's where my ignorance showing.
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 5th Feb 2019 13:16
I think the correct term is "sentry gun".But once graphix has finished the script it could be also modified to a cannon\howitzer or mortar version i think.
I found smallgs vehicle gunner script its very similar, i try now to read some about lua scripting for gg maybe i can change it to a sentry gun script, i have only to remove the "drive" part from it.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Feb 2019 19:58
So I'm getting there:

A few things to sort out still but the approach seems to be workable.
Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 6th Feb 2019 20:41
Nice that u found a way to "drop" the weapon after use, that could be the reason for the"how to drop\swap the weapon"problem that many users asked for.U think it could be used also in normal, pickable weapons?
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Feb 2019 21:08
That bit is easy, the standard weapon script simply calls Destroy(e) when it is used, if instead you call Hide(e) an CollisionOff(e) the entity will still be there so you can they just reverse it with Show(e) and CollisionOn(e).

Next up I'm going to figure out how to disable the reload part, i.e. when you select the static weapon have it start off with max ammo preloaded.
Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 6th Feb 2019 21:32 Edited at: 6th Feb 2019 21:40
Quote: "Next up I'm going to figure out how to disable the reload part, i.e. when you select the static weapon have it start off with max ammo preloaded."

I thought this thinks depend from the gunspec file, right?
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Feb 2019 21:45


Slightly better!
Been there, done that, got all the T-Shirts!
PM
bluemeenie195
6
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 6th Feb 2019 23:55
Wow ! That looks great.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 7th Feb 2019 08:34
Ok, hit a bit of a problem with this, there doesn't appear to be any way to remove a single weapon from the players 'inventory', we can remove all the weapons and we can replace individual weapons but not add and remove single weapons.

I'm going to play around with replacing to see if it is possible to somehow fool the engine into replacing a weapon with nothing, but I think the neatest solution would be to add a new command to remove a single weapon.

What this means is that as it stands you could have a game where the only weapons are machine gun nests but couldn't combine this with carried weapons, at least not with the approach I am using.

Stay tuned as I'll figure it out eventually.

I've attached the script so you can see the general idea but it is nowhere near complete yet.

Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 7th Feb 2019 08:55
This post has been marked by the post author as the answer.
Ok panic over, ReplacePlayerWeapon( 0 ) does sort of work, has the strange side effect of having the left over uzi ammo added to the carried weapon (which I'll try to fix later) but at least it solves one problem at least.



I'll need to find a way to temporarily replace the currently held weapon with the fixed one, storing all the appropriate variables, then reverse the process when you stop using it, should be doable just need to figure out the correct sequence of runes and which sacrificial offerings are appropriate, may involve some chanting as well.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 7th Feb 2019 12:13 Edited at: 7th Feb 2019 13:44
Great job!Do u know how to make the weapon allways "zoomed"?i mean the iron sight view like yours, if i take the weapon i cant even click right mouse to zoom, its disabled.
EDIT:
I edited the gunspec, replaced the numbers from:
zoomto = 352,361
zoom idle = 362,411
zoom move = 412,441
zoom start fire = 442,445
zoom automatic fire = 446,457
zoom end fire = 458,462
To:
select = 0,14
Idle = 15,64
Move = 65,94
start fire = 95,97
automatic fire = 98,113
end fire = 114,115
Now its :
select = 352,361 etc......
but the weapon isnt in the middle like in the zoom mode, its from left to middle
how do u made it right with the uzis?

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 7th Feb 2019 19:08 Edited at: 7th Feb 2019 21:17
There is a section in the gun spec to specify where the weapon offsets are.

For the uzi I copied the whole folder to uzi_fixed, edited the model to make the normally collectable bit centred properly, i.e. forward is Z and rotated it vertical. Then edited the gun spec file and fpe to get it all to behave.

When I'm next on my PC I'll upload the edited gunspec and fpe files.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 7th Feb 2019 21:22
I figuret it out, its the "muzzleflash position", i edited it and it looks nearly perfect like the right mouse zoom, the only problem is the firespot isnt at the same place as the crosshair , theres a few milimeters difference, when i set the horiz= -25 its too much right, if i do -26 the weapon is too much left and the gunspec file dont accept -25,5.
;HUD muzzleflash position

horiz = -25
vert = 2
forward = -35
alignx = 0
aligny = 0
alignz = 200
I dont used uzi, i used the mg42 to rigg my weapon so i think the positions would be different.
the first picture is with -25, the second -26

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 7th Feb 2019 21:58
Try 25.5 it does accept floats see my file for example.
Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 7th Feb 2019 22:58 Edited at: 7th Feb 2019 23:09
Tried allready, not much difference, see on my pictures, the weapon seems perfectly centred but for some reason the crosshair is in another position,i had in plans to disable the crosshair for this weapon but the bullets are landing where the crosshair is, not where the direction of the weapon barrel shows.Its only milimeters but the aiming is innacurate.It would be much easier just to set the weapon in a "allways zoomed" mode, iam pretty sure the gunspec must be edited for that, if someone knows how to do that let us know here in this thread.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 7th Feb 2019 23:11
Just ditch the hud. This sort of weapon is not that accurate anyhow, not on full auto anyhow, more short bursts then re-aim.
Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 7th Feb 2019 23:55
sorry my english is bad, what means to ditch?i think u dont mean the same that google translator
btw, witch command in gunspec disable the weapon moving while breathing?
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 8th Feb 2019 00:13 Edited at: 8th Feb 2019 00:13
Don't bother with the hud aiming is what I meant.
Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 8th Feb 2019 00:37 Edited at: 8th Feb 2019 00:43
GOT IT FINALY!!!!!!!!!!
after hours of playing with gunspec and a half package cigarettes i found it, it was at the end of the file, its called "rooty"
it was set to 1, changed to 0 and viola

Now i have to disable this breathing\moving think tried this commands

zoomaccuracybreath = 0
zoomaccuracybreathhold = 0
zoomaccuracyheld = 0
zoomholdbreath = 0
but seems like they are linked to the zoom mode witch i deleted
@Amenmoses how to delete the breathing?it drives me crazy
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 8th Feb 2019 16:31
almost there

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
Various Tutorials by me
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 8th Feb 2019 18:55
nice static guns. looks cool.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
bluemeenie195
6
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 8th Feb 2019 22:03
Nice !
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Feb 2019 16:40


Nearly there!
Been there, done that, got all the T-Shirts!
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 9th Feb 2019 21:12
Amazing !!
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 9th Feb 2019 21:58 Edited at: 9th Feb 2019 22:07
@Graphix u know for sure how to delete the weapon moves while breathing, as i can see your weapon is without, i try it since days and cant find the right command pls help me. Once i fixed that, next iam gonna rigg a cannon witch shoots with rpg bullets, maybe also a mortar that throws grenades.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Feb 2019 22:51
I think the breathing stuff is in the gameplayercontrol.lua, my script disables all that stuff.
Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 9th Feb 2019 23:14
Quote: "my script disables all that stuff."

The script define the files in the entytybank, not gamecore i think, otherwhise the script does not disable that stuff cuz if i add your script to my weapon and pick it up theres still this moves , slowly up and down.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Feb 2019 00:06
When you press the movement keys? Or just all the time?

Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 10th Feb 2019 01:07
Quote: "When you press the movement keys? Or just all the time?"

All the time.
For thoseones who wanna rigg their own static weapons:
To disable the move anims just replace the number from "idle"to"move" in gunspec.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Feb 2019 11:34
Ahh, are you forcing 'zoom'? I am not using zoom mode.
Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 10th Feb 2019 14:16
No its not the zoom mode
https://streamable.com/5m9hl
heres the video, after picking weapon theres this moves.
I dont know why the qualitty is low, i use apowerrec to record.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Feb 2019 15:28
Weird, looks like the walking head wobble but that should only happen when the movement keys are pressed.
Been there, done that, got all the T-Shirts!
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 10th Feb 2019 17:31
i put the gunspec file here, maybe u can figure it out

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Feb 2019 18:12
Sorry means nothing to me.

This is the one I'm using.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 10th Feb 2019 20:34
@osiem80:
Anything is the gunspec file that is not an animation call needs to use a . not a comma.
roty = 0,5 should be roty = 0.5
horiz = -24,5 Should be horiz = -24.5

Can you send me the HUD file to myke1net@hotmail.com. I would like to see if the bobble is in the animation.

Thank you.

RIP
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

New:
Intel(R) Core(TM) i5-8400 CPU @ 2.81GHz, 12GB RAM, Nvidia gtx1050ti 4gb, Windows 10 Home 64bit, Screen resolution 1920 x 1080. System Passmark 3774




osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 10th Feb 2019 23:09 Edited at: 11th Feb 2019 14:44
Fixed, thanks to piratemyke.Replaced the anim frame 15,6 with 15
https://streamable.com/rg2iq
The script need to be edited, for example if u take the weapon and shoot it empty, then take again the ammo becomes full.
Or if u use the static weapon u can still swap the weapon with mouse scroll.
I hope the creators of GG adding stuff like this in the next updates so the enemies can also use this type of weapons.
PM
bluemeenie195
6
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 2nd Mar 2019 00:09
Anything new with the turret gun ?
I've been dying to try that.
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 2nd Mar 2019 01:24
What do u mean?There is a script for that in this thread, as i sayed its not perfect/finished.Ask amenmones maybe he perfected the script.
PM
bluemeenie195
6
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 2nd Mar 2019 01:32
I have the script and it works great, but I am talking about the big-G gun that Graphix and Amen Moses were working on.
PM
osiem80
5
Years of Service
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 2nd Mar 2019 02:48 Edited at: 2nd Mar 2019 02:50
Oh, i think they made it for themselves, not for free or sell, but ask they both self, iam not sure.
BTW, u found a way to turn off the scroll weapon switch during using the static gun?And to set a ammo quantity?
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 2nd Mar 2019 11:15
I am thinking of releasing my Gun, just wondering the best way around it
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
Various Tutorials by me

Login to post a reply

Server time is: 2024-12-22 14:07:54
Your offset time is: 2024-12-22 14:07:54