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.
[07:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[06:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[04:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
Please log in to shout.


Members Online: jun3hong, jjf28, NudeRaider