My code that runs when I create the enemy on begin play sets the half capsule height and radius to the same random value and then sets the velocity of the character movement to 100*the forward vector of an arrow, and it works when I drop the enemy in the level, but the velocity doesn’t work when it’s spawned with a blueprint. However, the setting of the capsule height and radius still work. Pls help?
Hey @Waluwuigiboi! Welcome to the forums.
Let’s try again, a little slower.
So any pictures would help, video would be even better! Try to break down what is happening piece by piece instead of everything being one long thought, most programmers handle long problems using compartmentalization!
There are a lot of moving parts to what you’re saying is going on, so would you mind trying to get us as specific of information as possible? Most importantly, if you are new you want to include as much detail as possible and pictures REALLY help with that (don’t just snip out the only part you think there’s an issue with).
Let’s start with what is happening, and then another statement of what you WANT to happen, ok?
Hope to hear back soon!
Hey, these are great!
Okay, here’s what you need to do:
If these are characters, remake them, it looks like it will be fast enough. You need to avoid CharacterMovement Component. They only need to move in a straight line without gravity, right? You need PROJECTILEMovementComponent!
You set the movement speed within the movement component and set it to move 1,0,0 making it move forward in the X (or 010 for Y or 001 for Z). Then when it spawns, it knows its job.
You may be able to go to File-> reparent blueprint and reparent to ACTOR instead of character, that should do most of the work for you so you don’t have to build it from scratch and you keep the same class.
Good luck!
This helped! Thank you! It took a bit of figuring out, but I got there!