[TF2] Acquire player's weapon_bone coordinates?
3 Attachment(s)
(SOLVED, GO TO SECOND LAST POST FOR SOLUTION)
SetParent and SetParentAttachment don't work this time, unfortunately. I'm trying to make a dropped clone of the player's weapon, but after switching to using offsets to spawn the weapon it's physics now freeze. (If you don't know what offsets I'm talking about, it's like signatures but easier to find due to asherkin's vtable dumper) I soon found out that the cause was the parenting, where it had previously worked for a CreateEntityByName-spawned weapon drop. Before I wrote up the code utilizing SetParent on the given entity, I had experimented with getting an origin and angles from a parented info_target but it didn't work too well once I found out it doesn't have an origin property... Now I brought back that old info_target thing after finally discovering datamaps existed, but GetEntPropVector reports the datamap as out of bounds, only having 1 element... (Happens to m_vecOrigin, m_angRotation plus their Abs counterparts m_vecAbsOrigin, m_angAbsRotation respectively) Anyone willing to offer some help? I don't exactly use IDA so... er... EDIT: Attachment 177843 Attachment 177841 Attachment 177842 Put the .txt file into the gamedata folder. |
Re: [TF2] Spawn weapon drop onto player's hands properly WITHOUT SetParentAttachment?
Lets skip past what you think the solution is a double check your XY problem.
What are you trying to do? |
Re: [TF2] Spawn weapon drop onto player's hands properly WITHOUT SetParentAttachment?
Quote:
I want to spawn the dropped weapon on the coordinates of the player's weapon bone. I initially used SetParent and SetParentAttachment but after I decided to spawn a dropped weapon using gamedata, it's physics no longer work/sleep and it stays frozen in the air if I used the parent method, which I don't want it to. The physics'll work if I just leave it alone after spawning, but then it won't spawn on the player's weapon bone. Yes I tried the Wake input and no, it doesn't work because the dropped weapon doesn't have the input. |
Re: [TF2] Spawn weapon drop onto player's hands properly WITHOUT SetParentAttachment?
Quote:
So i had to damage the ragdoll with DMG_CLUB or DMG_BLAST https://github.com/LuxLuma/L4D2_Defi...s.sp#L337-L357 https://github.com/LuxLuma/L4D2_Defi...gdolls.sp#L276 Because using TeleportEntity() would cause the ragdoll to sleep. Maybe this will work in TF2? Incase you have an issue with damage forces and can't disable it, you can make a damage hook and edit damage forces in there to 0 https://github.com/LuxLuma/L4D2_Defi...s.sp#L232-L240 Like here i do with the ragdoll editing the damage forces. |
Re: [TF2] Spawn weapon drop onto player's hands properly WITHOUT SetParentAttachment?
Quote:
|
Re: [TF2] Spawn weapon drop onto player's hands properly WITHOUT SetParentAttachment?
|
Re: [TF2] Spawn weapon drop onto player's hands properly WITHOUT SetParentAttachment?
Quote:
I'm spawning the weapon through the signatures, yeah. Spawning that weapon through the sig, then using SetParent + SetParentAttachment causes it to sleep/remain frozen in the air. That bug didn't happen on a dropped weapon made by CreateEntityByName. I've decided to post the full Dead Ringer sp file on the first post. Check up there. Oh yeah, it's also the first time I'm using attachments so forgive me for it looking like a link. EDIT: My dumbass forgot to include the gamedata, sorry for throwing any of you off. |
Re: [TF2] Spawn weapon drop on player's hand coords properly WITHOUT SetParentAttachm
Quote:
If you need a clone, that should be something like CreateEntityByName + tf_weapon_* - see: https://developer.valvesoftware.com/...ess_2_Entities |
Re: [TF2] Spawn weapon drop on player's hand coords properly WITHOUT SetParentAttachm
2 Attachment(s)
If tf2 has features like this you can try through signatures like I did but this is for l4d2
Using the signatures I got the coordinates of the bones what you need should be in the 44-56 lines |
Re: [TF2] Spawn weapon drop on player's hand coords properly WITHOUT SetParentAttachm
Quote:
I want to replicate the effect of dropping a weapon like in a feign death. Quote:
If it doesn't, then I'm in a bit of a pickle regarding IDA; I don't know how to use it to find signatures. I'd like to find signatures by myself, but all of the tutorials I found only gave a bit of info at it's best. Plus, I really don't want to get a VAC ban and I don't have any other PC operating system other than Windows. |
All times are GMT -4. The time now is 01:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.