-
Hey Saul; thanks so much for the awesome lib and all the effort you put in! I've been working on something to parse demos and get all the he/smoke/flash/molo/incin data. For all the others it's been relatively straight forward to match up the start & end locations (of a throw) by getting the From what I can tell though there is no Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments
-
Grab the entity of the grenade from the entityid event variable. You can then do |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response! If I have demo I've tried a few and just seem to be getting nulls, while there is a value for |
Beta Was this translation helpful? Give feedback.
-
It’s not a handle - it’s an index. Try |
Beta Was this translation helpful? Give feedback.
-
Ah that did the trick, I'd tried |
Beta Was this translation helpful? Give feedback.
-
No problem @n1c |
Beta Was this translation helpful? Give feedback.
-
Hey @n1c If you don't mind me asking - how do you "link" the two events hedetonate and weapon_fire? `const demofile = require('demofile'); fs.readFile('C:/Users/Gamer/Desktop/2018/csgo_demo_parser/match730_003301150011605123236_1345725134_136.dem', function (err, buffer) { demoFile.gameEvents.on('hegrenade_detonate', e => { let currentTick = demoFile.currentTick; console.log( demoFile.gameEvents.on('weapon_fire', d => { let currentTick = demoFile.currentTick; console.log( demoFile.parse(buffer); |
Beta Was this translation helpful? Give feedback.
-
Hey @madsboending; I kinda scrapped this together quickly so hopefully it makes sense: https://gist.github.com/n1c/27dc159ad09740953ea760d7dc1f4ace (also it's in TS hopefully that's still useful) Maybe Saul can confirm 😉 |
Beta Was this translation helpful? Give feedback.
-
That helps ALOT! Thank you so much @n1c ! But I'm a bit unsure what you achieve by listening for "round_officially_ended"? I'm still struggling with figuring out how deep in a round the HEs were thrown, I know I need to substract currentTime of the round_start from the currentTime of the throw, but can't seem to wrap my head around it. |
Beta Was this translation helpful? Give feedback.
-
The For the time you can probably do something like listen for the |
Beta Was this translation helpful? Give feedback.
-
Thanks for this @n1c - looks perfect! |
Beta Was this translation helpful? Give feedback.
Hey @madsboending; I kinda scrapped this together quickly so hopefully it makes sense: https://gist.github.com/n1c/27dc159ad09740953ea760d7dc1f4ace (also it's in TS hopefully that's still useful)
Maybe Saul can confirm 😉