Scripts / Pickup script with a image instead of text?

Author
Message
Slaur3n
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 16th Sep 2008
Location: Norway
Posted: 2nd Feb 2015 22:30 Edited at: 2nd Feb 2015 22:46
Is it possbile having for example a "image" in the middle of the screen when pointing at a weapon when close enough to it to pick up? Instead of text..

Your signature has been erased by a mod! Too large
Avram
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 3rd Sep 2006
Location: Serbia
Posted: 3rd Feb 2015 17:42
Yes, however note that atm you can show only one image (as soon as second image is displayed, first will be hidden), so unless that is exactly what you want, it might be inconvenient to use it.

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Feb 2015 21:42
i didnt test it but this should do what you want - just change the folder to relate to the folder with the image you wish to show
(note you can still pick up the weapon too, as it's just a slightly edited version of the weapon script)



life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Slaur3n
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 16th Sep 2008
Location: Norway
Posted: 4th Feb 2015 01:57
cant find the path to the images, crashes at the loading. Where should i have the folder? i just put it in scriptbank calling it handpickup and added a dds image inside.. and changed it to the foldername in script.. didnt work

Your signature has been erased by a mod! Too large
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 4th Feb 2015 18:59
Yes the folder should be inside the
Script bank folder, it should be a
PNG called 000.PNG

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Slaur3n
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 16th Sep 2008
Location: Norway
Posted: 4th Feb 2015 22:24 Edited at: 4th Feb 2015 22:26
yea, i cant get it to work :/ its supposed to be a image of a little hand appearing when you are close enough and pointing on a "pickup"

Your signature has been erased by a mod! Too large
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 5th Feb 2015 09:36
You will need to position the image too then
If I get time I will post a working script for you
Later

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Slaur3n
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 16th Sep 2008
Location: Norway
Posted: 5th Feb 2015 18:06
hope so, would help alot

Your signature has been erased by a mod! Too large
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 6th Feb 2015 13:21
this works for me - make sure you are naming the image and folder correctly
the picture must be a png named 000.png (zero not o)
the folder must be in the scriptbank folder named images (if the images folder doesnt exist then make 1)
change the Loadimages part of the script to match your folder name





life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Slaur3n
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 16th Sep 2008
Location: Norway
Posted: 6th Feb 2015 19:24 Edited at: 6th Feb 2015 19:37
now it working BUT when picked up the gun, the hand image dont disappear

Btw i had to make a "images" folder, then a new "images" folder inside with the 000.png to get it working.

Your signature has been erased by a mod! Too large
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 6th Feb 2015 20:16
yes that's correct, all folders containing images must be in the folder named images (the new folders you can name anything as you call those in the scripts) - i did try to say that but i guess i didnt explain it well

as for the image not disappearing when picked up - sorry i missed that, fix is simple though, just add HideImage(1) above Destroy(e) like so



life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 6th Feb 2015 20:53
I was hoping Reloaded would be further along by now in terms of the scripting abilities. I'd like to start multiple hud layering images now. But it doesn't seem possible? Should I wait till 2016?

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
Slaur3n
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 16th Sep 2008
Location: Norway
Posted: 6th Feb 2015 21:41 Edited at: 6th Feb 2015 21:41
Now it works! Thanks a bunch!

If i want this script to work with ammo and other pickups, i just copy, and use other functions?

Your signature has been erased by a mod! Too large
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 6th Feb 2015 23:15
yeah that would be the most straight forward way i think, there's not really much difference to a standard weapon pick up and an ammo or health pick up etc so spotting the differences now there's image code should be pretty easy

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Slaur3n
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 16th Sep 2008
Location: Norway
Posted: 7th Feb 2015 00:57
Big problem!
If i add multiple weapons with the script. Only the last weapon added has a working hand image.. the others have no hand image but work as normal

Your signature has been erased by a mod! Too large

Login to post a reply

Server time is: 2024-05-07 18:50:30
Your offset time is: 2024-05-07 18:50:30