Reply to sp_distance and sp_range effects on enemy sprites
If you don't have an account, just leave the password field blank.
So after watching Robj and the black scorpions in SOB I thought to take another look at ways to adjust when an enemy strikes and at what distance the strike is effective.
So sp_distance sets a value of pixels that determine when the sp_base_attack seq occurs - as per the DinkC Ref:
For an active_sprite with sp_brain() 9 targeting another sprite (through sp_target()), the active sprite will try to walk within distance pixels of its target. If the distance value is 0, it will default to 5. Once within range, the active_sprite will attack the target if it has a sp_base_attack() set and is not waiting to attack (from sp_attack_wait()).
So is the distance a measurement based on the direction the sprite is currently facing? I assume so, but have learnt not to assume anything in DinkC.
Then sp_range will extend the hardbox of all other sprites during an attack (20 years ago I thought it extended the range or hardbox of the current_sprite, opps)
So in DinkC Ref sp_range does the following:
For an active_sprite that is playing an animation sequence with a special damage frame (i.e. attack sequences), the range value is used to temporarily deform the hardbox of all other sprites according to the current direction of the active_sprite. The active_sprite will hit any of the active_sprites that it overlaps.
This is where I think it doesn't. I did a test where I changed the sp_distance of the black scorpion to 35 and the range to 90. You can position Dink such that he is within the sp_distance to trigger the attack, and the hardboxes do overlap, but Dink is not actually hit/damaged. And I made sure Dink should be getting damaged as I tweaked the sp_strength value to be 30 points more than his current Defense.
Here is a image in Debug mode of this in action
Here is a overlay-ed version showing what the various hardboxes are, the blood waterfall sprites of which there are two vertically stacked, the water/blood outlet sprite, and Dink's range extended hardbox coloured green, and the scorpion's hardbox coloured red, the orange colour is the overlap of those two hardboxes as they are transparent layers in the original image.
So I thought, what if I used the set_sprite_info line just to increase that sprite frame's hardbox - as was done in the original Slayer enemy, but no - even taking the hardbox to a square almost half the size of the screen, Dink could still position himself in a way where the enemy scorpion is forever attacking and never hitting Dink.
This is a section of the game play test showing this
So sp_distance sets a value of pixels that determine when the sp_base_attack seq occurs - as per the DinkC Ref:
For an active_sprite with sp_brain() 9 targeting another sprite (through sp_target()), the active sprite will try to walk within distance pixels of its target. If the distance value is 0, it will default to 5. Once within range, the active_sprite will attack the target if it has a sp_base_attack() set and is not waiting to attack (from sp_attack_wait()).
So is the distance a measurement based on the direction the sprite is currently facing? I assume so, but have learnt not to assume anything in DinkC.
Then sp_range will extend the hardbox of all other sprites during an attack (20 years ago I thought it extended the range or hardbox of the current_sprite, opps)
So in DinkC Ref sp_range does the following:
For an active_sprite that is playing an animation sequence with a special damage frame (i.e. attack sequences), the range value is used to temporarily deform the hardbox of all other sprites according to the current direction of the active_sprite. The active_sprite will hit any of the active_sprites that it overlaps.
This is where I think it doesn't. I did a test where I changed the sp_distance of the black scorpion to 35 and the range to 90. You can position Dink such that he is within the sp_distance to trigger the attack, and the hardboxes do overlap, but Dink is not actually hit/damaged. And I made sure Dink should be getting damaged as I tweaked the sp_strength value to be 30 points more than his current Defense.
Here is a image in Debug mode of this in action
Here is a overlay-ed version showing what the various hardboxes are, the blood waterfall sprites of which there are two vertically stacked, the water/blood outlet sprite, and Dink's range extended hardbox coloured green, and the scorpion's hardbox coloured red, the orange colour is the overlap of those two hardboxes as they are transparent layers in the original image.
So I thought, what if I used the set_sprite_info line just to increase that sprite frame's hardbox - as was done in the original Slayer enemy, but no - even taking the hardbox to a square almost half the size of the screen, Dink could still position himself in a way where the enemy scorpion is forever attacking and never hitting Dink.
This is a section of the game play test showing this