• Hey! Register here to create your account, engage with the community, and talk about what is new!

Damage all players who're near a projectile

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,245
Reaction score
349
without damaging the owner. thanks in advance
You want to damage people when it hits? if yes, then here is how u do it:
on Player Event: Hit Projectile, do your checks (if you have more than 1 projectile in your game or something), now place a Select Object -> Create Selection -> If Player Is Near; for the 1st slot of the chest, get a Game Value: Location, hold and shift-right click it and click on Projectile then put it in the chest, and in the 2nd slot of the chest put a number of your choice. Now after that selection block, place another one, click it and set it to Filter Selection -> If Player Name Equals, in the 1st slot of the chest, put a text called %shooter and use the NOT Arrow on the selection block so it inverts, now anything you do to the selection after the selection blocks will be done to the players near the projectile except the owner.
 

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,245
Reaction score
349
is there a way to damage players while the projectile is in the air? also thanks for replying
yeah, instead of putting the code directly in the Projectile Hit Event, start a process in the projectile hit event and put a repeat inside of it then place your code between the repeat brackets
 

Dienxia

New member
Joined
Oct 19, 2021
Messages
9
Reaction score
1
yeah, instead of putting the code directly in the Projectile Hit Event, start a process in the projectile hit event and put a repeat inside of it then place your code between the repeat brackets
So, PlayerEvent: Projhit > Checks > Start Process: test -> Process: test > Repeat: Forever [ Select Obj: PlayersCond - PIsNear > SelectObj: FilterCond - PNameEquals - NOT > Player action]

Is this right? if it is then it's not working for me
 

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,245
Reaction score
349
So, PlayerEvent: Projhit > Checks > Start Process: test -> Process: test > Repeat: Forever [ Select Obj: PlayersCond - PIsNear > SelectObj: FilterCond - PNameEquals - NOT > Player action]

Is this right? if it is then it's not working for me
oh no, i did an oopsie, not Proj Hit, either Shoot Bow Event or Shoot Projectile Event. sorry D:
1649850435599.png1649850449655.png
 

Dienxia

New member
Joined
Oct 19, 2021
Messages
9
Reaction score
1
oh no, i did an oopsie, not Proj Hit, either Shoot Bow Event or Shoot Projectile Event. sorry D:
oh then it won't work, since it only works if the player throws the projectile, I don't think it works when you launch a projectile by code. I also can figure out how to stop it repeating
also, why don't you join the diamondfire discord? it's much more active and you can get help fast :D
I'll think about it, thanks for replying again :D
 

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,245
Reaction score
349
oh then it won't work, since it only works if the player throws the projectile
you can start the process just after you launch the projectile and instead of using the Projectile as your target, use last entity and it should work
 
Solution

Dienxia

New member
Joined
Oct 19, 2021
Messages
9
Reaction score
1
you can start the process just after you launch the projectile and instead of using the Projectile as your target, use last entity and it should work
yes I got it to work! thank you so much! I figured out that since it's not an entity event, the %default would be the person who triggered the event, and not the projectile.
 
Top Bottom