oh damn i didnt realize it was that simple to toggle something on and off in godt. here i was like making functions to change whether something is on or off, but this looks much more simple
the code for walking is not working for the latest godot if input_movement_vector.x ! = 0 or input_movement.y ! = 0: walking = true else: walking = false it tells me that i have done a error
Codat, is there a way around the pathfinder.gd problem in the current 3.2.1 stable version of godot? This error: *Invalid type in function 'get_point_path' in base 'AStar'. Cannot convert argument 2 from Nil to int.* ?
well, i do not get any errors in 3.2.1. The error occurs because get_points_index(vector) returns null. that means that the indicies dictionary do not contain element with the vector param as the key. This could be due to the fact that the player is "out of bounds" of the map. Its important that all the floortiles are at the correct positions, and that the floortiles is the only tiles the player and the monster will navigate on top of. To clarify, in the _init-function you initialize all the possible points on the gridmap into the indicies dictionary. So, you must not walk outside these points, because the monster will try to get a point that does not exists within the indices dict. Hope it helps :)
@@codat3821 Thanks Codat! Question! In my games I want to eventually give the player the ability to block off door ways and stuff so monsters can't get to them. If the point doesn't exist in the indices dictionary, can we make the monster just stop and stay in place? which syntax line would we change?
@@SolarpunkJackal well.. from the top of my head, you should be able to remove the point in the indicies dictionary corresponding to the position of the tile where u placed ur door. If you do that, the monster will not consider that tile as a possible node to walk on anymore. And if u remove the door, add that point back to the indicies array. I think that would work. Otherwise, the monster is a kinematic body and moves with move_and_slide function. So the monster will try to move through the door, but because of collision its not able to. :)
@@codat3821 Ah ha! remove the point in the indicies dictionary corresponding to the position of the tile where the barrier is placed. Thanks SO much for your response! Really appreciate it.
when i put "$Head/Camera3D/SpotLight3D.visible = not $Head/Camera3D/SpotLight3D.visible" the "not" does not appear green and is red, and thus not working. any clues as to why?
oh damn i didnt realize it was that simple to toggle something on and off in godt. here i was like making functions to change whether something is on or off, but this looks much more simple
woah this series looks epic I've never tried 3d before and also am a noob to godot, but I might give this a shot sometime looks really cool!
Go ahead! 3D is quite easy in godot :)
Really cool man. Im waiting for the next episode
Vibes vibes vibes 💪😍
the code for walking is not working for the latest godot
if input_movement_vector.x ! = 0 or input_movement.y ! = 0:
walking = true
else:
walking = false
it tells me that i have done a error
it should be == in the conditions, i,e, you should give == in place of = in the if statement
@@DineshYadav-iv5jo thank you for replying my comment after 5 months lmao
When will the nest episode come
please tell me i am waiting for it
probobly pretty soon, cant say for sure :)
@@codat3821 within a week or so
Oh my god... Thank you. Real.
In Godot 3.2.2 i have issues with flashlight on/off in the $CameraPivot/SpotLight... now just type $SpotLight and it works.
Codat, is there a way around the pathfinder.gd problem in the current 3.2.1 stable version of godot?
This error: *Invalid type in function 'get_point_path' in base 'AStar'. Cannot convert argument 2 from Nil to int.* ?
well, i do not get any errors in 3.2.1. The error occurs because get_points_index(vector) returns null. that means that the indicies dictionary do not contain element with the vector param as the key. This could be due to the fact that the player is "out of bounds" of the map. Its important that all the floortiles are at the correct positions, and that the floortiles is the only tiles the player and the monster will navigate on top of.
To clarify, in the _init-function you initialize all the possible points on the gridmap into the indicies dictionary. So, you must not walk outside these points, because the monster will try to get a point that does not exists within the indices dict.
Hope it helps :)
@@codat3821 Thanks Codat! Question! In my games I want to eventually give the player the ability to block off door ways and stuff so monsters can't get to them. If the point doesn't exist in the indices dictionary, can we make the monster just stop and stay in place? which syntax line would we change?
@@SolarpunkJackal well.. from the top of my head, you should be able to remove the point in the indicies dictionary corresponding to the position of the tile where u placed ur door. If you do that, the monster will not consider that tile as a possible node to walk on anymore. And if u remove the door, add that point back to the indicies array. I think that would work.
Otherwise, the monster is a kinematic body and moves with move_and_slide function. So the monster will try to move through the door, but because of collision its not able to. :)
@@codat3821 Ah ha! remove the point in the indicies dictionary corresponding to the position of the tile where the barrier is placed. Thanks SO much for your response! Really appreciate it.
when i put "$Head/Camera3D/SpotLight3D.visible = not $Head/Camera3D/SpotLight3D.visible" the "not" does not appear green and is red, and thus not working. any clues as to why?
nvm, i figured it out. the line of code wasn't the issue. it was "Flashlight" and not "flashlight" :9
This is an interesting series. May I suggest you zoom in a bit on the code as it is a bit difficult to read. Liked and Subbed.
Will do! u are not the first one commenting on that ;)
thanks!
It steals?