Problem with Tsukihime's Camera Target Script!

alphab817

Game Maker, Graphic Designer
Member
Joined
Feb 9, 2014
Messages
14
Reaction score
1
First Language
English
Primarily Uses
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
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Hmm, who is the target of your move route?
 

alphab817

Game Maker, Graphic Designer
Member
Joined
Feb 9, 2014
Messages
14
Reaction score
1
First Language
English
Primarily Uses
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
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?
 

alphab817

Game Maker, Graphic Designer
Member
Joined
Feb 9, 2014
Messages
14
Reaction score
1
First Language
English
Primarily Uses
That's not the mistake. I've tried that. It still didn't work and I still got the same error. :/
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
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.
 

alphab817

Game Maker, Graphic Designer
Member
Joined
Feb 9, 2014
Messages
14
Reaction score
1
First Language
English
Primarily Uses
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!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top