c_ry.uwu Posted September 23, 2023 im trying to make a custom enemy attack but when i run gzdoom, it gives this error. anybody know why? 0 Quote Share this post Link to post
baja blast rd. Posted September 23, 2023 If you're screencapping SLADE, it's a good idea to include the line numbers so that we can quickly see what "line 136" in the error message is. That can (but not always) tell you where the error is. You're using the wrong syntax in the pain.VelFromAngle line. You don't have to declare the values you're passing as variables. That line should be: pain.VelFromAngle(31, 13e7); Also you're going to want to null check pain, like if (pain) { pain.angle = angle; pain.VelFromAngle(31, 13e7); } Because if SpawnMissile does not create the pain elemental -- let's say the spawn destination is blocked -- you'll be trying to do operations on data that doesn't exist and there will be a crash. So "if (pain)" makes sure that pain exists and is pointing at something. I'm not sure if this is how you want to create a new attack ('extend class', etc.), but the next helpful poster can get into that... 2 Quote Share this post Link to post
c_ry.uwu Posted September 23, 2023 thank you, im pretty new to modding the game, so i dont know all that much about it. also i meant to add the line numbers i even thought "hey i should def add these to the screenshot" and then i forgot lmao 1 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.