3D Jump scare

C

CornerLord

Guest
I want to make a jump scare to my game when player is in the right place. I have tried draw_sprite but the animation wont play. I have also tried to make that sprite into a object and use instance_create. To get it in right place I made object for it and used d3d_draw_block command because so player will hit the trigger of jump scare. Then I drew jump scare animated sprite in players draw gui event by using draw_sprite command but animation won't work at all.
So basically when player is walks to A point then jump scare animation plays in the middle of the players screen.

Thanks for reading and I hope you understood what I'm trying to say :)
 

TheouAegis

Member
Is the sprite drawing but just not with animation? If that's the case, it's because you need to animate it yourself.

When the trigger is hit set:

jump_scare_anim = sprite_get_number(spr_jumpscare) * number_of_steps_to_show_each_frame

In the Draw Gui Event:

if jump_scare_anim draw_sprite(spr_jumpscare, sprite_get_number(spr_jumpscare) - (jump_scare_anim-- div number_of_steps_to_show_each_frame), 0, 0);
 
Top