Can't pickup item

Discuss artwork in all of its forms here, from level design to GUI button themes. New MODs planning, work-in-progress and other samples are welcome in this forum as well.
Post Reply
User avatar
arfur9
Posts:90
Joined:2017-02-25, 18:57
Location:uk
Contact:
Can't pickup item

Post by arfur9 » 2020-02-06, 17:14

I thought I'd replace the ammo items I've noticed missing, I started off with some shotgun shells but I can't pick them up.
I looked at other ammo, Ammo_DesertEagle is still there and I can pick that up and the weapon, I can pick up a shotgun ok

Its going to be something simple but I'm not seeing it!

edit:
Nevermind sorted it, I didn't realise I needed to add the inventory item to the HumanPlayer.lua

the script for Bazooka seems to be wrong?
Line 179

Code: Select all

            local c1 = world:new("ComponentModelT")
            c1:set("Name", "Games/DeathMatch/Models/Weapons/Grenade/Grenade_w.cmdl")
it draws grenades at the crosshair
in console:

Code: Select all

Player picked up item:	Bazooka
Warning: Lua error in call to method Think():
Games/DeathMatch/Scripts/Rocket.lua:22: attempt to call global 'Vector3T' (a nil value)
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Can't pickup item

Post by Carsten » 2020-02-07, 10:24

Well, grenades are used here because we don't have any better models, i.e. no model for the bazooka projectile. ;-)
Best regards,
Carsten
User avatar
arfur9
Posts:90
Joined:2017-02-25, 18:57
Location:uk
Contact:

Re: Can't pickup item

Post by arfur9 » 2020-02-08, 18:09

if you try the bazooka with the map AEonsCanyonTower you will see what I mean about "method Think():" problem

Its around level D
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Can't pickup item

Post by Carsten » 2020-02-11, 09:50

You are right. I don't know why I haven't seen this sooner.
You can fix this by placing

Code: Select all

dofile("Games/DeathMatch/Scripts/Vector3.lua")
as the first line in Games/DeathMatch/Scripts/Rocket.lua.
I've also just pushed the fix to the repository.
Thanks for reporting this! :up:
Best regards,
Carsten
User avatar
arfur9
Posts:90
Joined:2017-02-25, 18:57
Location:uk
Contact:

Re: Can't pickup item

Post by arfur9 » 2020-02-11, 11:24

thanks, yes that works :)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests