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.
[10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
[2024-5-04. : 1:05 am]
Vrael -- that's better
[2024-5-04. : 12:39 am]
NudeRaider -- can confirm, Vrael is a total madman
[2024-5-03. : 10:18 pm]
Vrael -- who says I'm not a total madman?
[2024-5-03. : 2:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
Please log in to shout.


Members Online: Oh_Man