Staredit Network > Forums > Modding Assistance > Topic: GPTP: Detect if attack is melee/ranged
GPTP: Detect if attack is melee/ranged
Feb 29 2024, 4:36 pm
By: Netbek  

Feb 29 2024, 4:36 pm Netbek Post #1



In GPTP, is there an inbuilt property I can use to check if an attack is melee/ranged? Or is the only way to do this to reference the range of an attack?

(I am modifying weapon_damage.cpp from GPTP-for-VS2019.)




Mar 3 2024, 3:51 pm UndeadStar Post #2



You need to check the range.
I mean some melee weapons have a range of 10, but then do the flamethrower count considering its 32 range?
Also, I don't remember if there's one unit like that, but if there's a melee attack with AOE, should it count?
Because of those small cases, checking the range (and possibly the splash radius) is the logical option.

edit: just realized the nuke got a range of 3, all is in the splash radius, yep it's tricky.




Mar 4 2024, 7:42 am IlyaSnopchenko Post #3

The Curious

Weapons.dat weapon behaviour?
I mean, that's how I would do in SCR/AICE, but idk if GPTP can do it this way.



Trial and error... mostly error.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:08 am]
Ultraviolet -- Yeah I mean it's just always veering off in the same direction which doesn't give the feeling of movement based inaccuracy. I'd say it should jitter around if you're going for an inaccurate effect while strafing. Also it doesn't seem to do it when strafing right so I wasn't sure if it was intentional or not
[03:34 am]
Zoan -- that's on purpose; got to stand still to be accurate, and you can't just strafe away while firing consistently ;) does it feel weird tho
[12:26 am]
Ultraviolet -- I tested a little, the shots fired weirdly in not quite the right direction when I moved and shot at the same time, seemed a little off
[10:02 pm]
Moose -- dark web game o_o
[07:21 pm]
Zoan -- here's the temporary link (I'll get a domain later) http://3.145.71.231:3000/
[07:03 pm]
Zoan -- hey I made a .io game, anyone wanna help me test it
[2025-6-20. : 11:51 am]
UndeadStar -- :wob:
[2025-6-20. : 6:11 am]
7-7 -- Been a minute
[2025-6-20. : 1:43 am]
O)FaRTy1billion[MM] -- :wob:
[2025-6-19. : 7:49 pm]
RexyRex -- :wob:
Please log in to shout.


Members Online: O)FaRTy1billion[MM]