#why cant i drag marker3d to the waypoint?

100 messages · Page 1 of 1 (latest)

bright mango
#

Maybe try changing line 7 to:

@export var waypoints: Array[Marker3D] = []

I think that is the usual way to do static typing, not with an as Array[Marker3D] at the end

#

I'm not sure if that will work, but it should make it so that your exported array is typed correctly

feral venture
#

Let me try it

feral venture
#

if you help me i will buy you 1 game

#

from steam

#

if you can fix my issue

bright mango
#

You'll have to fix the error first, for the code to have any effect

feral venture
#

for some reason if i delete everything else

#

it works but...

bright mango
#

Looks like it's on line 35

feral venture
#

if waypoints.is_empty():
waypoints = get_tree().get_nodes_in_group("enemy_waypoint")

bright mango
#

Okay, yeah, that makes sense

#

Um, is it important for this array to only accept Marker3D types? Like, is the static typing really important to your code?

#

If so, then we can fix line 35. If not, then we can just change line 7 to:

@export var waypoints: Array[Node] = []
feral venture
#

i need that marker 3d so my enemy ai can move of the place

#

finaly

feral venture
#

it finaly worked

bright mango
#

Great!

#

Happy to help!

feral venture
#

How can I thank you?

bright mango
#

I'm good! I just tried to help someone else and it didn't go well. So i'm just glad i was able to help you 👍

feral venture
#

got another issue

#

why my character moves like this?

bright mango
#

Oh, leaning over?

feral venture
#

yeah

#

idk how to fix it

bright mango
#

Is it a character body or rigid body?

feral venture
#

CharacterBody3D

bright mango
#

Let me look into it

feral venture
feral venture
bright mango
#

I don't see anything in there that is changing the rotation. When does this happen? Right away when you start the game?

feral venture
#

yes

bright mango
#

Is it tilted in the editor, before you start the game?

feral venture
#

when i start the game the enemy rotates it weirdly

feral venture
bright mango
#

If you look at the 3D scene, is this character tilted?

feral venture
#

my character is stand up like this

#

sorry my english is bad

bright mango
#

Hmm, i'm not sure what would cause it then

#

There is a way to keep the character from rotating:

#

Check the "Angular X/Y/Z" boxes under "Axis Lock"

feral venture
#

i checked it

#

and i turned it on

#

but still have the same issue

bright mango
#

Hmm, i'm not sure then. It sounds like the rotation is getting set directly somehow. It's not a physics thing

#

It says you have a few errors in the "Debugger" at the bottom of the page. Can i see what those are? Might be related

feral venture
#

yes

bright mango
#

Okay, those don't seem to be related

#

Maybe, could you zip your file and send it to me? I'm not sure what could be causing the issue, so it would be helpful if i could just look around

feral venture
#

yes

#

wait

#

its loading

bright mango
#

Cool 👍 i'll take a look

feral venture
#

this is the old code

#

this is my old code for my character but it didnt work so i asked ai to help me and it messed up

#

but before the character act normaly

#

it moves from a to b

#

but then it doesnt move

#

now my character moves but rotation is weird

bright mango
#

Okay, i can't get it to run, with the original code or this code you just sent

feral venture
#

the original code you can forget it

bright mango
feral venture
#

enemy

#

enemy_move.gd

bright mango
#

Okay, sorry, i still can't get it to run. Does it run on your computer?

feral venture
#

its runs the original code

#

but the enemy dont move

feral venture
#

also no need to sorry you help me a lot

#

i need to thank you

bright mango
#

Yeah, it's giving me a crash on the player script. I think it can't find some nodes, like "pistol" and "pickaxe"

#

I have to go right now, but i can keep on looking at this in an hour or so

feral venture
#

but i said the original code

#

its for the enemy

feral venture
#

we can keep talking later

#

because now i have to sleep

bright mango
#

Hey, i took a quick look at your project. The issue might be that your enemies have different scripts. It looks like the first enemy (called just "enemy") has the script "enemy1.gd". The other enemies have the script "enemy_moves.gd"

#

I wasn't able to get your project to run, so i'm not certain if this is the issue. But this is a possible thing to look at and fix

bright mango
# bright mango

(Sorry that my mouse isn't showing up in the screencast. I haven't been able to make it show up in my screencasts)

#

So, i'm actually going to get off of Discord for a while. (I've been spending too much time on it 😅 ) So I won't be able to help you anymore with this problem

#

If my idea that i sent above doesn't work, you might try making another post to ask about this problem. I'm sure someone else will be able to help 😊

#

Good luck with your project!