Jump to content
Sign in to follow this  
PirateCaptain

Dump current active interactive item ID

Recommended Posts

PirateCaptain

if managers.interaction._active_object then

	io.stderr:write(string.sub(tostring(managers.interaction._active_object:interaction()._unit:name():t()), 1, 10) .. "

")

end

managers.hud:show_hint( { text = "[email protected] sent to debug window" } )

Share this post


Link to post
Share on other sites
PirateCaptain

Where can I find the ID it dumps? I cant seem to find in the debug menu

look at last line of your debug window when you use it.

Share this post


Link to post
Share on other sites
PirateCaptain

Sorry if I sound ignorant, but we are talking about the debug menu thats in game right?

no we are talking about the separate window that opens alongside the game when it starts

if enabled in pd2hook.yml ( Please login or register to see this link. )

Share this post


Link to post
Share on other sites
PirateCaptain

Thankyou captain I appreciat e your input

yw, you can payback by being nice to a n00b today :D

Share this post


Link to post
Share on other sites
PirateCaptain

Is it possible to get the interactive item PATH the same way you get the ID? Or is there a way to find out the file path from an Item ID?

Please login or register to see this link.

look at the UNITS section, maybe you can find it there.

Share this post


Link to post
Share on other sites
SirGoodsmoke

Please login or register to see this link.

look at the UNITS section, maybe you can find it there.

Yea I did that before hand, I found all the paths I need except for two items, Gold Loot and Money loot from Firestarter Day 2, this is the ID im trying to locate but having a hard time doing so

@IDe6cb9c8

If Im asking too much ill stop lol

Share this post


Link to post
Share on other sites
PirateCaptain

Yea I did that before hand, I found all the paths I need except for two items, Gold Loot and Money loot from Firestarter Day 2, this is the ID im trying to locate but having a hard time doing so

@IDe6cb9c8

If Im asking too much ill stop lol

I had no idea it was different loot on that level, gonna have to stop by and have a look.

Share this post


Link to post
Share on other sites
SirGoodsmoke

I had no idea it was different loot on that level, gonna have to stop by and have a look.

Yea Im having a hard time trying to get the ones that spawn in that level, it should be the same gold and money as found in the Bank:Gold heist the ones on the table, and the money is the same as the one from Bank:Money also the ones found on the table, I can get them to spawn in Day 2 Firestarter but cant interact with it neither on the bank heist which is odd to me

So pulled that ID with your script, hoping that it could help get somewhere

These are the paths I can spawn but cant interact with them for some reason

units/payday2/pickups/gen_pku_money/gen_pku_money.unit

units/payday2/pickups/gen_pku_gold/gen_pku_gold.unit

Share this post


Link to post
Share on other sites
DjaysPierre

Yea Im having a hard time trying to get the ones that spawn in that level, it should be the same gold and money as found in the Bank:Gold heist the ones on the table, and the money is the same as the one from Bank:Money also the ones found on the table, I can get them to spawn in Day 2 Firestarter but cant interact with it neither on the bank heist which is odd to me

So pulled that ID with your script, hoping that it could help get somewhere

These are the paths I can spawn but cant interact with them for some reason

units/payday2/pickups/gen_pku_money/gen_pku_money.unit

units/payday2/pickups/gen_pku_gold/gen_pku_gold.unit
I worked on a modification of the code, to get the name of the unit at the crosshair in debug, but it does not work:

local camera = managers.player:player_unit():movement()._current_state._ext_camera

local mvec_to = Vector3()

local from_pos = camera:position()

mvector3.set( mvec_to, camera:forward() )

mvector3.multiply( mvec_to, 20000 )

mvector3.add( mvec_to, from_pos )

local col_ray = World:raycast( "ray", from_pos, mvec_to, "slot_mask", managers.slot:get_mask( "all" ) )

if col_ray then

   io.stderr:write(string.sub(tostring(managers.player:player_unit()._unit:name():t()), 1, 10) .. "

")

end

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Stop being a peeping tom and join the community.... we got cookies

Join the crew now

Sign in

Already part of the crew? Board right here

Sign In Now
Sign in to follow this  

×