Problem with Tsukihime's Camera Target Script!

Hello everyone! So I'm having a problem with Tsukihime's Camera Target script. Supposedly, to make the camera follow the player, you need to go to Set Move Route, click Script, and input this:
set_camera_target(char_id = -1)
Well, I did and I got this error when I tried testing the game.

Script 'Game_Character' line 180: NoMethodError occured.

undefined method 'set_camera_target' for #<Game_Player:0x793c6d0>

I don't know why it's not working and was wondering if someone could be out with this! I would greatly appreciate it! 🙂

-alphab817
Hmm, who is the target of your move route?
Please reread my question. I stated that the player is my target.
I'm having problems having the camera follow the player.

I inputed set_camera_target(char_id = -1), like I'm supposed to if I want it to follow the player, but I got the error that I mentioned in my question.
set_camera_target(char_id = -1)
That code is wrong, and it was never displayed like this anywhere in the script's description.
You never use = inside an argument, that was part of the description and NOT of the command.


The command is set_camera_target(char_id)


And in tha command, you replace the "char_id" with the ID you want to use - you do not keep the words inside.


In your case, the correct command would be


set_camera_target(-1)


Do you see where your mistake is?
That's not the mistake. I've tried that. It still didn't work and I still got the same error. :/
That's not the mistake. I've tried that. It still didn't work and I still got the same error. :/
That is ONE mistake - no matter what else you did, an ID is always a number and you have to use the command in the form I placed it, or it will never work.
If you still get an error, then you have additional bugs in your sequence - but we can only start looking for them after you changed the command to the form I described.


Please post a screenshot of the event page/move route where you use that command. After that we can look for the other errors.
Actually, nevermind, I found a solution. I message Tsukihime, and he said it was a bug in the script and told me another way to do it. I just have to set the Move Route to This Event instead of Player, becasue as long as the script call is set_camera_target(-1), it should still follow the player. Thanks anyways for your help!

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-tsukihimes-camera-target-script.23991/