hey guys, just a quick question.
My player wants to carry an object and taking it along somewhere to finally throw it.
My player got the Variables:
Hero X = Map X
Hero Y = Map Y
....Question:
How Can I show a Picture of that Object right on top of my player?
If I press SHOW PICTURE and giving it the variables Hero X and Hero Y it's still arriving at the top left corner of the frame.
After that.. I want to make it move always with my player.
What am I failing at right now?
I don't know if there is a better way to do this but this is what I do:
In a parallel event:
Variable1 (heroX) = Screen X of player
Variable2 (heroY) = Screen Y of player
script: $gameVariables.setValue(3, $gameVariables.value(2) - 80);
The script is the variable 3(pictureY), the number "80" can be changed to make it closer to the character, it depends on the picture size. If you want the picture to be on the left or right of the character instead of on top just make another script for the picture X, for example script: $gameVariables.setValue(4, $gameVariables.value(1) + 80);
Now on the event where you pick up the item make 3 pages:
On the first show the picture, with the coordinates Center, heroX and pictureY. Then switch self-switch A.
On the second page make it parallel and with self-switch A as the condition. In there Move picture, with the same coordinates but with 1 frame duration and uncheck the waiting time.
On the third just make an empty page with a normal switch as the condition (PictureSwitch, for example), no parallel.
And finally on the event where you need to deposit the item, erase the picture and switch the PictureSwitch on.
megumi014. I did it exaclty like you wrote here 5 minutes ago but without this "-80-stuff". im not really into scripts and stuff ^^ trial and error with photoshop did the job with the right place. thank you very much!
can be closed ;D