I would like to make a solo mode "shooting gallery" level. When looking through the Events, I saw the OnHit event. This looks perfect, but I think it only fires when Players or Bots are hit. If the Pole would generate an OnHit event if it was shot by the player, that would allow interesting levels, such as "Activate Checkpoint 3 if Pole 1 is shot"
And by "hit", I mean "The energy bolt fired by the Player intersects some small unique feature on the Pole, such as the light source" not "the energy bolt fired by the Player hits anywhere near the Pole". Otherwise, it's not much of a skill to hit it.
My goal was to combine target shooting (for example, gain 3 points when you hit a target, lose 1 point every shot you make) with a variety of TimeAttack, to make a timed shooting gallery, so solo players could practice speed and accuracy shooting. For example: Run through the level, turn on all 10 checkpoints (each of which activates when a Pole is hit) to reach the Finish.
What do you all think of this suggestion?
[SUGGESTION] Could OnHit event fire for Poles as well?
Moderator: English Moderator
Re: [SUGGESTION] Could OnHit event fire for Poles as well?
well i don't think that this would make sense as the OnHit events are intended to get only triggered when players have been hit
nevertheless you should be able to make a work around!
you can get the shooting direction of players and the position of poles, so you could calculate if the rocket is gonna hit the pole (you can't tell if a specific lighting spot of the pole will be hit of course)
nevertheless you should be able to make a work around!
you can get the shooting direction of players and the position of poles, so you could calculate if the rocket is gonna hit the pole (you can't tell if a specific lighting spot of the pole will be hit of course)
Re: [SUGGESTION] Could OnHit event fire for Poles as well?
If I could get the X,Y,Z position of the pole and X,Y,Z position of the player, and both angles of the player's shot (X/Y and Y/Z axes) I could calculate if the shot will intersect the pole. But it would be a hitscan calculation, I think --- not "once the rocket hits the pole, it is 'hit'"
Is there any way to get the position of a rocket? Then I could calculate its position relative to the pole's position, including the height, and score a hit when the position was "close enough" to the desired location. If I then know the height of the pole (how "tall" the pole itself is), I could calculate when the light fixture was hit, instead of just the pole itself.
Thanks.
Is there any way to get the position of a rocket? Then I could calculate its position relative to the pole's position, including the height, and score a hit when the position was "close enough" to the desired location. If I then know the height of the pole (how "tall" the pole itself is), I could calculate when the light fixture was hit, instead of just the pole itself.
Thanks.
Re: [SUGGESTION] Could OnHit event fire for Poles as well?
that's easily possible (i'm calculating head shots like that :p)bluemist1 wrote:If I could get the X,Y,Z position of the pole and X,Y,Z position of the player, and both angles of the player's shot (X/Y and Y/Z axes) I could calculate if the shot will intersect the pole.
look here: http://tmrankings.com/maniascript/html/annotated.html
Code: Select all
Player.Position;
Player.AimDirection;
BlockPole.Position;
that's correct, if a player shoots in the right direction you can't tell if there is still something in between (like a wall), so i would suggest making it only possible in a range of 20m or something like thatbluemist1 wrote:But it would be a hitscan calculation, I think --- not "once the rocket hits the pole, it is 'hit'"
regarding the correct timing, just calculate the speed of rocket and you will be able to calculate the arrival time

p.s. i will calculate the speed of rockets real quick ...
Re: [SUGGESTION] Could OnHit event fire for Poles as well?
Rocket Values:
Flight Distance: Up to 150 meters
Flight Speed: 36.1 - 36.3 m/s
Flight Duration: Around 4 seconds
Flight Distance: Up to 150 meters
Flight Speed: 36.1 - 36.3 m/s
Flight Duration: Around 4 seconds
Who is online
Users browsing this forum: No registered users and 1 guest