THROW ITEM ASSISTANCE
Posts
Pages:
1
Happy Holidays Everyone,
I am currently working on a project with my girlfriend and we are trying to make it where the character can throw certain items. However after having the proper script I get an error message sayin undefined item x= Vehicle or something the other on line 36 my line looks like this
@character.x = $game_player.x
if someone could point me in the right direction thank you.
I am currently working on a project with my girlfriend and we are trying to make it where the character can throw certain items. However after having the proper script I get an error message sayin undefined item x= Vehicle or something the other on line 36 my line looks like this
@character.x = $game_player.x
if someone could point me in the right direction thank you.
Perhaps you should clarify which engine are you using, so people can know how to help you. And maybe show us the script you're using.
It's probably vx ace, I would assume.
The x might mean the item you're trying to throw and you have to fill in the proper x with item number in the database.
But without further explanation or pictures, might be hard to pin point :(
The x might mean the item you're trying to throw and you have to fill in the proper x with item number in the database.
But without further explanation or pictures, might be hard to pin point :(
![]() | Did somebody say something about throwing objects!? |
It kinds sounds to me like the code "@character.x = $game_player.x" might be trying to get the x position of the player character (a Game_Player object) but getting a Game_Vehicle object instead? So, if the vehicle it's trying to reference does not have a defined x-position, that might be why it's returning this error.
I could also be completely off the mark with this, since I have no idea how this script works, or what it even looks like, outside of the one line that's being shown.
*Edit: Another possibility that comes to mind is how the variable "@character" is defined in the context of the script. If it hasn't been defined at all (ie: it's null), it would not have a ".x" operator/function, which is why it's returning this error.
Pages:
1
















