Spawning a hitbox actor on top of a randomly spawned actor

owen_dennisowen_dennis Just a guy, you know.Member, PRO Posts: 236

Hey guys! I've got an enemy hitbox actor that "approaches" the screen by getting larger. I would like those randomly placed around on my screen, which is working perfectly fine. However, I want a different actor to spawn on top of it and be attached to it every time.

Basically it's like a rock flying toward the screen, but only the the very bottom of the rock works as a hit box. So I don't want anything to happen if the rest of the rock is touched, but the bottom of the rock causes things to happen. I figure I'll do all the controlling of the rock through the hit box actor, and just have the rock follow it, but I'm not sure how to make the rock follow it if it's randomly put on the screen somewhere.

Maybe I could make it so that when the hitbox is spawned, it spawns the other actor on top of itself at blah blah coordinates? I'm not sure how to then make that instance of the actor stay stuck to that instance of the hitbox. It would be nice if I could just spawn a group of sprites sitting in a certain way, but I don't know of a way to do that.

This seemingly simple thing is a little tough, so any help would be appreciated!

Comments

Sign In or Register to comment.