Raised This Month: $51 Target: $400
 12% 

[CS:GO] Weapon Attachment API


Post New Thread Reply   
 
Thread Tools Display Modes
Mitchell
~lick~
Join Date: Mar 2010
Old 04-14-2016 , 10:36   Re: [ANY?] Weapon Attachment API
Reply With Quote #11

Quote:
Originally Posted by xines View Post
Sure
I have updated the API to version 1.0.2, try that out. If that doesn't work then i'm not sure if this api could be for any game.
Mitchell is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 04-14-2016 , 11:15   Re: [ANY?] Weapon Attachment API
Reply With Quote #12

Quote:
Originally Posted by Mitchell View Post
I have updated the API to version 1.0.2, try that out. If that doesn't work then i'm not sure if this api could be for any game.
After updating and retrying it gave me this error:

PHP Code:
ERRORTried to SetParentAttachment for entity info_target (info_target), but it has no attachment named muzzle_flash
__________________
xines is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-14-2016 , 11:19   Re: [ANY?] Weapon Attachment API
Reply With Quote #13

Quote:
Originally Posted by xines View Post
After updating and retrying it gave me this error:

PHP Code:
ERRORTried to SetParentAttachment for entity info_target (info_target), but it has no attachment named muzzle_flash
What weapon were you trying it on?
Mitchell is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 04-14-2016 , 11:21   Re: [ANY?] Weapon Attachment API
Reply With Quote #14

Quote:
Originally Posted by Mitchell View Post
What weapon were you trying it on?
m4a1 and usp, i'll try more weapons, give me a moment.

EDIT:

Same result on every weapon.
__________________

Last edited by xines; 04-14-2016 at 11:36. Reason: Tested more weapons
xines is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-14-2016 , 11:23   Re: [ANY?] Weapon Attachment API
Reply With Quote #15

Sadly, I dont think it will work outside CS:GO, I will try and look for another method, however it seems that theres no way of my getting the attachment location as the same way in that's possible in cs:go.
Mitchell is offline
vadia111
Senior Member
Join Date: Dec 2013
Old 04-14-2016 , 12:35   Re: [ANY?] Weapon Attachment API
Reply With Quote #16

tf2 work ?
vadia111 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-14-2016 , 12:46   Re: [ANY?] Weapon Attachment API
Reply With Quote #17

Quote:
Originally Posted by vadia111 View Post
tf2 work ?
Not until I can find a fix that supports all games.
Mitchell is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-14-2016 , 22:17   Re: [CSGO] Weapon Attachment API
Reply With Quote #18

UPDATE (v1.1.0):

Added support for Source2009 games! (INCLUDING TF2)

Let me know if there is any issues that occur.


Downloads
Plugin
Source
Include File

GitHub Link
Mitchell is offline
Timon5022
Junior Member
Join Date: Jun 2005
Old 04-25-2016 , 10:54   Re: [CSGO] Weapon Attachment API
Reply With Quote #19

I see in your plugin that you do not add a delay between setting parent and then calling SetParentAttachment, as suggested by https://developer.valvesoftware.com/...hy_(parenting).

Can you maybe explain why this is not necessary? I am trying to same approach with parenting an entity to the face of a player model, but in this case, the vector position of the entity is not correct. I am thinking I need the delay in this case. But maybe you can tell me otherwise?
Timon5022 is offline
Send a message via MSN to Timon5022
Mitchell
~lick~
Join Date: Mar 2010
Old 04-25-2016 , 12:52   Re: [CSGO] Weapon Attachment API
Reply With Quote #20

Quote:
Originally Posted by Timon5022 View Post
I see in your plugin that you do not add a delay between setting parent and then calling SetParentAttachment, as suggested by https://developer.valvesoftware.com/...hy_(parenting).

Can you maybe explain why this is not necessary? I am trying to same approach with parenting an entity to the face of a player model, but in this case, the vector position of the entity is not correct. I am thinking I need the delay in this case. But maybe you can tell me otherwise?
That is suggested with the use of SourceSDK, Hammer. I've never had issues with ClearParent then SetParent then after, let alone SetParent and SetParrentAttachment.
I also do the same thing with parenting on my CarryC4 plugin here: https://forums.alliedmods.net/showthread.php?p=2378573
Mitchell is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode