Could you help me triggering an explosion when my timer widget reaches 0?
I have created a fracture (explosion) blueprint that destroy a spaceship (made of multiple meshes). And I have my timer widget aswell.
I already created a condition: when timer reaches 0 then print string so that is working fine but I can’t do it to trigger an event (blueprint).
Any help would be greatly appreciated.
Here attached is a screenshot of my Timer Widget BP.
hello,what the explosion looks like?the space ship in the level to explodes,or spawn a new explosion particle somewhere?
there’s a lot of ways doing such behavior.simple ways are when the time reached 0,just get the ship and call it’s explosion function.or spawn a particle where you like.
yes like how to trigger it when timer is 0. I can only “cast to BP_Fracture” but i don’t think that helps. I think I should create a function but I am not sure
you write all code at begin play.that means as soon as the “fracture actor” born into the world,it will do the explosion immediately. And you have already set up a timer. Just put a “spawn actor from class” node to replace that print text.
Hi @baobao4435 , thanks again for your reply!!
I will try that but I also want to keep the print string… I want to generate the “Game Over” on the screen when the timer is 0 as well as trigger the destruction.
Transform is basically location,rotation and size information.he’s asking you like where should I spawn at and what rotation,etc.is the ship an actor?
if so,i suggest create an event in the ship BP,name it “ship explosion”,and in that event you can spawn the “fracture BP”,then use “get actor transform” to feed the spawn transform.