[Help] Making a 2D shooter. Having a variety of difficulties, including figuring out collision.
I'm doing a basic Game Fundamentals course, and they've started us out on UE4. The first assignment's due soon and I'm incredibly lost with Blueprints, as it's not how I'm used to doing things at all.
This is one of the main bullet blueprints, sending it forward. However, when fired, it seems to not fire from the ship, instead firing nearby. The enemies do the same, and I'm not sure how to fix this.
However, the bullets work fine - when aimed properly through the glitchy placement, they destroy the ships, which animate. The player also takes damage when hit. So that's not an issue.
Another collision problem: I need to make the player teleport if they hit the sides of the screen - to the other side of the screen. I'm thinking the Teleport blueprint would work for this, but I don't know how to set something like 'if player is at x location' for the Teleport to trigger on. I'm assuming it's something with the 'Get Actor Location' blueprint, but I don't know how to make it a condition.
If anyone knows any resources I can use to help with additional parts of this assignment, please let me know - I've got to set up a deposit area and all, too, and I've only got a week to finish everything.
Posted May 1, 2016, 8:45 AM UTC
Can you show the blueprint where you spawn the bullets?
Sure, here's what I'm using for the enemy and for the player.
What's the 250uu Y value on the bullet spawn location for? Could that be the problem?
Try offsetting the location and see where the bullets spawn from (break vector, add to/subtract from the floats) and feed the modified values back into the SpawnActor Bullet.
Or alternatively get the location from somewhere more reliable - like a socket you could add to the Player blueprint in the Viewport tab, at the exact location you want bullets to spawn from.