Help me with show picture command

Hello guys, I'd wanna know which code (with 'call script command' ) I should use in my project for showing a picture in a map, but without needs definite the coordenates for it (These values already are defined in another command).


Per example: You know... When we have show a picture in map we have set its coordenates, right? But I don't wanna set it, because my picture will be in random coordenates each frame, so I don't need definite these values, got it?


My picture will be in various coordenates depending on situation in my game, but I've change its image sometimes, but when I'll change it, I should set specifics coordenates, and I don't want to this.


How do I do?
I've moved this thread to Learning Javascript. Please be sure to post your threads in the correct forum next time. Thank you.
Ok friend sorry, I thought that here was the correct area for this question.


Anyway people, I tried use this code with call script command:


$gameScreen.showPicture(IDIMAGE, name)




So I did: $gameScreen.showPicture(1, hud_hp)


But when I'm testing the game an error saying ''hud_hup is not defined'' appears.


What did I do wrong? 
Where did you define the variable hud_hp?


If that was intended as a name and not as a variable, then you need to write it as a string, not as a variable name...


A string begins and ends with '


'this is a string'


this_is_a_variable_name

Original thread: https://forums.rpgmakerweb.com/threads/help-me-with-show-picture-command.57629/