| Blockland Forums > Modification Help |
| Homing Player With Sword Weapon |
| << < (2/7) > >> |
| Nethog:
--- Quote from: MegaScientifical on January 08, 2011, 06:57:46 PM ---You mean like a melee aimbot? Dude, shame. --- End quote --- it does that in the game |
| Uxie:
As in, all this happens with OnTrigger. |
| Nexus:
I have an idea for how it is done. You have a constant test being run that tests the distance of all players with a raycast. If a player comes close enough, then you have a simple command that causes your player to face the raycast, and attack. I'm busy with other stuff though, so get someone else to do it. |
| Amade:
--- Quote from: MegaScientifical on January 08, 2011, 06:57:46 PM ---You mean like a melee aimbot? Dude, shame. --- End quote --- What --- Quote from: Nexus on January 09, 2011, 01:13:18 AM ---I have an idea for how it is done. You have a constant test being run that tests the distance of all players with a raycast. If a player comes close enough, then you have a simple command that causes your player to face the raycast, and attack. I'm busy with other stuff though, so get someone else to do it. --- End quote --- I highly doubt you actually know what you're talking about, let alone if you know how to do this. On triggering you would use a containerRadiusSearch to find a nearby player (I believe the first target returned by containerSearchNext will be the closest one) then you would use setTransform on the player that will be attacking to rotate them. However, I have no idea how to convert from a vector to the 4-point rotation thing setTransform uses. |
| MegaScientifical:
--- Quote from: Amade on January 09, 2011, 03:04:52 AM ---What --- End quote --- --- Quote from: Uxie on January 05, 2011, 02:23:54 PM ---How would I make a player aim at another player in a specific radius then thrust at it and attack it? How am I supposed to do this code? --- End quote --- Although I guess he's doing serverside code, so it's... more okay... |
| Navigation |
| Message Index |
| Next page |
| Previous page |