Scripts / AddPlayerWeapon adds infinate clips

Author
Message
Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 20th Apr 2018 15:27 Edited at: 20th Apr 2018 15:34
Just noticed this when i added clips and ammo to the screen.
AddPlayerWeapon (number) is clocking up clips like mad so i must have missed some code to stop it :/
weapons are added via the map and clips displayed via g_PlayerGunClipCount
anyone know what i need to add plz?

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

Attachments

Login to view attachments
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 20th Apr 2018 16:39 Edited at: 20th Apr 2018 16:40
Quote: "anyone know what i need to add plz?"

Of course just remove the function TheScreenshotDoesNotReallyHelp() and add WeNeedTheScriptToTellYouWhatYouDidWrong()
That´s it

ok, for real. What can we advice you if we not even know what you did to get the result!
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 20th Apr 2018 16:49 Edited at: 20th Apr 2018 16:55
ahh ok m8 here's one of the scripts using it this is the main battle tank




lines 41 and 42 add the weapon

and the ammo display is on a non static entity
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: 20th Apr 2018 17:41 Edited at: 20th Apr 2018 17:45
Your variable for g_mech is always 1 once you have the mech, so it's always adding the weapons every time the script loops, you need to change the variable again after adding the weapons.

So what you need to do is have g_mech = 1 as collecting the mech and adding the weapons, then g_mech = 2 as the varable for when you are using the mech, if you know what i mean.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Honkeyboy
3D Media Maker
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 20th Apr 2018 19:19 Edited at: 20th Apr 2018 19:44
ahhh yeah cheers m8, yeah get exactly what you mean thx for that
Edit hmm still no go :/
Edit2: solved had the AddPlayerWeapon in the wrong place
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

Login to post a reply

Server time is: 2024-04-20 14:38:57
Your offset time is: 2024-04-20 14:38:57