Scripts / [SOLVED] adding flashlight to a specific wepaon/object..is possible?

Author
Message
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 18th Sep 2019 16:49
Hi I dont know if this is the right board to post this discussi by since i think is a scripting question i'll try..

i would to know if the flashlgiht "light" can be associated to a specific obejct/weapon to that it can be used only when a specifc weapon is equipped..

my player has a flashlight hand model in place and i would to know if i can do that player uses flashlight only when the hand+flashlight hud is active
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB

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

Go to answer
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 18th Sep 2019 17:47 Edited at: 18th Sep 2019 17:47
I'm pretty sure there is, and it should be simple.

You would need:

1. A way to identify the weapon slot .....
2. A way to disable the flashlight ......
3. A way to enable the flashlight .....
4. a way to toggle the flashlight when it's enabled .....

I know we have all these commands, not sure which or how to use them though.

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.
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 18th Sep 2019 18:38
yes i know commands are here .. the problem is that i dont know how figure them right now.. lol
i came form c# and i'm learning lua atm so i was thinking someone did thi on the past so i could have a starting point to work on
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 18th Sep 2019 22:19
This post has been marked by the post author as the answer.
attach it to an always active object somewhere and fill in your flashlights "weapon name" the system has for it - details in the script
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
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 18th Sep 2019 23:43 Edited at: 19th Sep 2019 07:16
Quote: "attach it to an always active object somewhere and fill in your flashlights "weapon name" the system has for it - details in the script"


great Master ..you're a life saver...mant thanks ....works great but there a little bug since player can use flashlight "before" flashlight/item(colt1911 in this case) item is picked up and is not inteded to work this way...like if the F keyis enabled

but after player pickup flashlight for the first time script correclty works and if flashlight/items is not equipped player correcly cant use flashlight and F key is correcly disabled

plus i noticed that changing the default colt1911 with other weapon names (tried Magnum357,RPG,Shotgun to test) scritp dont work..
if i leave
local weapon_name = "modern\\colt1911"
all works fine..why? I'm missing something?

Edit solved the flashlight active at start issue adding


i dont know if is it the best ways since i'm learning lua so maybe it's a wrong trick...LOL

solved all my bad wrong weapon name selected.. all works great.. now need to add some cool stuffs to my flshlight system like battery picup and drain and so on... thanks smallg.. great as usually

PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 19th Sep 2019 08:04
You should already know and have the resources to add batteries and such, i seem to remember you and me collaborating to round off one of smallg's script to include pickupable flashlights and batteries quite some time ago

https://forum.game-guru.com/thread/214886

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.
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 19th Sep 2019 10:03 Edited at: 19th Sep 2019 10:54
Quote: "You should already know and have the resources to add batteries and such, i seem to remember you and me collaborating to round off one of smallg's script to include pickupable flashlights and batteries quite some time ago "


yes my friend I remember.. that was about 3 years ago(( time flies).. hope my memory and my rusty and noobs lua skills could help me to figure it.. but i'm fiducios......

and is possible to make the flashlight light intensity to be less intense and the color to be changed and the radious reduced?.. in the apst i remember it was all hardcoded but now?
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
thughto
6
Years of Service
User Offline
Joined: 7th Mar 2018
Location:
Posted: 19th Sep 2019 17:19
Thank you so much guys!!
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 13th Oct 2019 23:11 Edited at: 13th Oct 2019 23:20
Hi again guys.,.. i integrated my system with battery flashlight system me smallg and belidos worked some time ago.. i managed to make light to be played only when flashlight is selected (weapon) but i have a issue related to the fact if i switch the flashlight with another weapon even if the light is correcly disabled and flashlight is deactivated when i re.switch to the flashlight battery drain start automatically even if i dont pressed f to startthe flashlight

PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 14th Oct 2019 04:39
If you supply a script, some of these guru's could probably help
you figure it out. I haven't a clue about animation sequences
or weapon scripts. Nice job so far.
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 14th Oct 2019 07:37 Edited at: 14th Oct 2019 07:37
thisi is the flashlight script


this is the flashlight equipped script


and this is the flashlight pickup script


smallg knows all of them LOL
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Oct 2019 17:20 Edited at: 14th Oct 2019 17:25
untested but this should fix it (also fixed the horrible lack of indentation )
edit; needed to also fix/allow for the "auto on" in the weapon attachment script
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
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 14th Oct 2019 18:43
hi smallg and thanks for your reply and scritps.. but before i go i would to ask waht did you do specifically

did you added the flstate on and off to the flashlight .lua functions and called the state in the flashlight_equipped script or did you add something else i missed?
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 14th Oct 2019 18:45
Quote: "also fixed the horrible lack of indentation "


what??
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 14th Oct 2019 20:20
Indentation?
.......Oh, I see
..............what you
.....................did there
..............Do you
.......mean like
this?
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Oct 2019 20:33 Edited at: 14th Oct 2019 20:34
Quote: "did you added the flstate on and off to the flashlight .lua functions and called the state in the flashlight_equipped script or did you add something else i missed?"

yes changed the state to flstate so it's less likely to get confused as i needed to make it a global so you can pass it between the 2 scripts, also fixed is_flashlight_active to be a global variable
then basically i just edited flashlight.lua to check and exit the script if is_flashlight_active = 0
and edited flashlight_equipped to update the 2 new global variables based on the weapon's equipped state
in short, just added a way to make the 2 scripts talk to each other
Quote: "Indentation?
.......Oh, I see
..............what you
.....................did there
..............Do you
.......mean like
this?"

yes
..just
....like
......that
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 14th Oct 2019 21:00
ok many thanks i'll try them now and see if it works ...thanks again...
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 14th Oct 2019 21:15 Edited at: 14th Oct 2019 21:16
i got 2 errors



PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Oct 2019 00:07
looks like you posted an extra 'end' right at the bottom of flashlight.lua, remove that and it should be fine
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 15th Oct 2019 00:10
Glad to see proper indentation of scripts is catching on at last.
Been there, done that, got all the T-Shirts!
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 15th Oct 2019 06:25
Quote: "looks like you posted an extra 'end' right at the bottom of flashlight.lua, remove that and it should be fine"


nope

i removed the last "end"at the bottom of the flashlight script by myself before you posted it ( trying to fix by myself) and the first error obviously get fixed but the second one related to the flashlight_battery script remains
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 15th Oct 2019 07:52

Add this piece of code at the bottom of the flashlight_battery.lua script.

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
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 15th Oct 2019 10:06
thanks i'll try tonight asap when at home ..
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 16th Oct 2019 19:23
all done and works perfectly mant many thanks smallg an 3com..

@3com.. i would to purchase your animated paper v2 on the store but didnt see the script to to animated it on the form page you linked
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB


PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 16th Oct 2019 19:30
@ JC LEON
Can you give me the store link please?
Don't know whats paper are you talking about.
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
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 16th Oct 2019 20:54 Edited at: 16th Oct 2019 20:54
Quote: "Can you give me the store link please?
Don't know whats paper are you talking about. "



Sorry the asset if form Oldpam.. but he wrote about you since you wrote the scirpt for it

here the link

https://www.tgcstore.net/product/27811

and what about your horror pack_?
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB


PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 19th Oct 2019 14:20 Edited at: 20th Oct 2019 00:18
ALL WORKS fine ..now i manage to have a simple reload anim for flashlight and set it to alf fire button (default left alt key)
how can i manage to make anim plays when player reload flashlight ..namely when player holds Fkey for 3 seconds to relload battery?



i managed to play reload anim with the command



and put it in this part of the code



but this way i have anim plays after the flashlight batteries are changed and animation is not syncro with events..

can someone could try to tell me how can i to set the codeto make the anim plays accordong woth reload??

thanks
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB


PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 20th Oct 2019 16:13
itried several ways to set the

SetGamePlayerStateIsMelee(1)

inside the scirpt but i got always the anims plays when player flashlight reload in done.. and it's not what iìn looking for

any hel p would be greatly appreacited
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB


PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 20th Oct 2019 17:27 Edited at: 20th Oct 2019 17:31
probably constantly calling the animation
try something like


i think this will just cause a graphical glitch if the player holds the F key for a while but doesn't completely hold it long enough to complete the reload as it will still play the animation so you will want to add a way to check for that and stop the animation if so..
something like
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 20th Oct 2019 21:17 Edited at: 20th Oct 2019 21:20
thanks smallg ..system works fine

honestly even with the liens of code you wrote to me


the glitch you wrote about remains but i sorted it not using these lines and simply set the


insted 0.35 and player plays anims only when the batteries are changed...

the only issue i have is that the flashlight light itself is active and can be started even before player finish reload anims and the flashlight is again on screen.. is there a way to make light to be started only when plashlight animation is completely played?? i tried several solutions but without great results

here a video

https://www.youtube.com/watch?v=eGR58Qk0Co8&feature=youtu.be

can please someone could correclty ebmed the video ...thanks i tried but not sorted it...

as you can se when player reload anims plays even if flashlight is not onscreen player is able to start flashlight.. and it's not great.. LOL
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB


PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 26th Oct 2019 23:07 Edited at: 26th Oct 2019 23:08
Hi again to all ... thaks to AmenMoses his great skill and great patience i managed to make flashlight correcctly work with reload battery anims, sounds and so on ...now i 'm going to fine tune the system and add a personalized and proper UI

many thanks again to all and obviusly to great _Amen...


here a video of my current flashlight system

https://www.youtube.com/watch?v=ThG7p0CnAi4&feature=youtu.be

plwase some mod embed the video since i'm goging crazy with the system on this forum ...
[video=youtube] ThG7p0CnAi4[/video]
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB


PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 27th Oct 2019 13:55 Edited at: 27th Oct 2019 13:57
It's really simple, and pretty standard across most forums:

Take the code part of your youtube URL afterwatch?v= and before &, which in your case is ThG7p0CnAi4 paste it into the post, then drag highlight it, click the video button at the top and select YouTube, that's it all done.




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.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 27th Oct 2019 20:48
Quote: "[video=youtube] ThG7p0CnAi4[/video]"


and it what i did you can see the lin posted exactly like you in my last post and it's exactly like your snippet.. LOL
... btw thanks
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB


PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 27th Oct 2019 21:56
Nope look at what you wrote. There's a space in there at the front of the code, there shouldn't be a space.

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.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 28th Oct 2019 07:00
Quote: "Nope look at what you wrote. There's a space in there at the front of the code, there shouldn't be a space."

oh my bad i didnt see the space .....i messed with it for 30 minutes only to disocvered taht i miss the space LOL... thanks mate

could i ask you a question ..if i remember correclly you added an inventory system to you great "The Island " game..is there a way to have some sort of tutorial or hints on how did you made it? or the code to study them(asking to much i know ... LOL??
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB


PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 28th Oct 2019 08:06 Edited at: 28th Oct 2019 08:09
It wan't really a real inventory system, it was just icons with a count that reads a variable, then when you pick an item up it adds to the variable and when you use it it takes away from the variable. The icons for the items were in a fixed position. It's just a matter of positioning the icons and the text and setting the text to display a number from the variable, it's fairly basic.

I'm not at the PC for a few days, but when i am i'll see if i can do a quick example script and post it for you. Bare in mind though that it might take a while for me to get to it because i'm pretty much finished with GameGuru once i release my Egyptian isometric kit and i'm pretty busy taking Unity courses.

If you want a better inventory system, Smallg did a really good system and posted it in his pinned thread here.

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.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 28th Oct 2019 08:40
hi and thanks for your time and effort to reply to me..really appreciate

i know smallg inventory system but sadly it cant bring items thought levels maybe your system since is a static invnetory could do the trick

btw if when you can if you can provide me an example it would be cool... many thanks in advance ..

p.s. i read you switched to unity ...i come back from it .. i learned a lot in unity and wish to you all the bests
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB


PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM

Login to post a reply

Server time is: 2024-12-22 09:14:33
Your offset time is: 2024-12-22 09:14:33