Product Chat / Weapon/item pick up

Author
Message
TattieBoJangle
10
Years of Service
User Offline
Joined: 7th Jan 2014
Location: United Kingdom
Posted: 6th Jun 2014 03:03 Edited at: 6th Jun 2014 03:04
Is there anyway to change the distance before the player will pick up a gun or ammo i have just bought unfamillia's animated Supply Crate awesome by the way but if you place a gun or ammo in the box the player collects when outside i think the range may need tweaking to allow for this sort of thing.





PC SPECS: Windows 8 Pro 64-bit, Intel I7 (PASSMARK 9529) 4GHz CPU, Asus R9 3GB GPU (PASSMARK 6858) 32GB DDR3 MEM (PASSMARK 2842)
TazMan
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 20th Jan 2011
Location: Worldwide Web
Posted: 6th Jun 2014 13:10 Edited at: 6th Jun 2014 13:12
I have changed the original scripts of ammo and weapon and renamed them to ontopammo.lua and ontopweapon.lua these allow you to get very close. You could try these.



Put them in \\The Game Creators\\Files\\scriptbank and then point the item at the new script when you place it in the box.



Regards

I've got something to say

----

It's better to burn out than fade away.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 6th Jun 2014 13:29
change the number 80 part of the code to a lower value (50~60 should be about right i would guess)



life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
unfamillia
Forum Support
13
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 6th Jun 2014 13:56
Thanks for the purchase. Glad you like it.

Somewhere out there, is the deep abyss of the forums, someone has made a script that only lets you pick up the weapon/ammo, when you are looking at it and you press 'E'.

That is what I had in mind when I created the supply box. But, I'm no scripter, so, I couldn't make it for people.

Cheers

Jay.

synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 6th Jun 2014 14:02
I just bought that as well...Awesome work...But the Tab function does not work on it to add items so I cant zoom in past the lid ?
Its a bit of a struggle to get anything in it unless theres an easy way ? At the moment im just placing ammo on top then right clicking and using PG/Up/Down to get it in the box

Any better idea's guys ?
PM
unfamillia
Forum Support
13
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 6th Jun 2014 14:07 Edited at: 6th Jun 2014 14:07
I didn't really think of that did I.



Maybe you could change the bottom of the FPE



playanimineditor=0



to



playanimineditor=1



Then, when the lid is open in the editor, you will be able to see inside the case.



This might work, it might not.



Before you build your game (or test it for that matter) make sure to change playanimineditor back to =0, otherwise, the case will continue to animate in game in a continuous loop, until you get near it and press 'E'.



Cheers



Jay.

synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 6th Jun 2014 14:46
Quote: "I didn't really think of that did I. "


LOL...No worries Jay its no biggie.... Its an awesome model and pretty Sci-Fi-ish which is what we are really lacking
I will try what you said but I wont lose sleep over it
PM
TattieBoJangle
10
Years of Service
User Offline
Joined: 7th Jan 2014
Location: United Kingdom
Posted: 6th Jun 2014 17:49
Thanks guys much appreciated





PC SPECS: Windows 8 Pro 64-bit, Intel I7 (PASSMARK 9529) 4GHz CPU, Asus R9 3GB GPU (PASSMARK 6858) 32GB DDR3 MEM (PASSMARK 2842)
TazMan
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 20th Jan 2011
Location: Worldwide Web
Posted: 6th Jun 2014 19:20
@smallg

I tried changing the code to 50 / 60 but the character would not pick it up. The only way I could get round it was to change the code like this.

function weapon_main(e)
PlayerDZ = g_Entity[e]['z'] - g_PlayerPosZ;
PlayerDis
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 6th Jun 2014 20:41 Edited at: 6th Jun 2014 20:44
try this

distance.lua





this will let you get closer while also taking into account the height (its a bigger range than it needs to be because of crouching)

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Login to post a reply

Server time is: 2024-05-07 23:46:01
Your offset time is: 2024-05-07 23:46:01