Pictures not displaying in correct positions

Status
Not open for further replies.

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
So, I want to display 3 images that appear directly behind the main character as part of my game's original battle system .  As I don't know scripting, I'm doing this all with events.

What it is supposed to do:

  • When a player touches an enemy on the field, the game game detects the direction the player is facing and the enemy moves one square away from the player and then faces the player.  Thus leaving a one square gap between them and then activates a common event called: "Where Battle Begins".
  • Next, the common event "Where Battle Begins" grabs the player's current coordinates (X, Y) and then does an if and statement to check which armor the player currently has equipped (so far, I only have one programmed). 
  • When it detects what armor the player is currently wearing, in this case the starting armor for the character Marx.J/Milun.J (Depending on if you play it in English or French), it sets off a new common event in this case called: "Marx/Milun .J - Base"
  • The Common Event: "Marx/Milun .J - Base" then does various things with several variables to find the coordinates for a picture that is to appear directly 1 up and 1 left from the character, followed by a picture that appears directly 1 up from the character and another that is 1 up and 1 left.  (I'm using this as a example because so far, I've only used it for the character facing down.  The idea is that if the character were facing up, left or right, the locations for the pictures would chanoge.  Either way, the pictures must adapt to appear wherever the character might be at any given time and regardless of facing direction).
  • I'll 'elaborate' more by adding some pictures:

The images (in order are):

  1. Picture of event/enemy that the player has to touch to activate the common event that starts the battle.
    PictureTrouble_Part1.png
     
  2. Picture of the initial common event.  Again, the one that starts the battle.
    PictureTrouble_Part2.png
     
  3. Picture of the common event that is supposed to place the images.
    PictureTrouble_Part3.png
     
  4. Picture of the command that is supposed to place the first of the "Show Picture".
    PictureTrouble_Part5.png
     
  5. Picture of the command that is supposed to place the second of the "Show Picture".
    PictureTrouble_Part6.png
     
  6. Picture of the command that is supposed to place the third picture, also using "Show Picture".
    PictureTrouble_Part7.png
     
  7. Picture of the images as they appear in game.  They all appear, but above one another instead of how they need to be.
    PictureTrouble_Part4.png
     
  8. How I want them to appear.
  • P = Player, A = Attack Icon, S = Weapon Skill Icon, R = Run Icon
    PictureTrouble_Part8.png
     
As always, thanks in advance everyone for any help I can get :) .

 
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Uhm, you should use Screen X/Y as pictures as placed via Screen X/Y and not via the grid... 1 tile of the grid is 32 pixels wide and 32 pixels high... so aside from using Screen X/Y, you would also need to add/subtract 32 instead of 1 for the adjustments
 
Last edited by a moderator:

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
Uhm, you should use Screen X/Y as pictures as placed via Screen X/Y and not via the grid... 1 tile of the grid is 32 pixels wide and 32 pixels high... so aside from using Screen X/Y, you would also need to add/subtract 32 instead of 1 for the adjustments
Great!  I appreciate your response.  I had completely overlooked that I could grab the "Screen X/Y" and not just the one I was using.

Problem is, though it is very close now to working, it misses the mark by a little.

Now my game shows them like this:

PictureTrouble_Part10.png

If I go into the Variables while testing my game I get this.. including some numbers showing decimals:

PictureTrouble_Part9.png

Here is my changed event:

PictureTrouble_Part11.png
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
it will show decimals coz it's float values... try adding/subtracting a buffer value to the X/Y (Like 16 or something)... just do trial and error to hit the spot, mostly, the adjustment buffer will be determined by the actual size of the images you're using...
 
Last edited by a moderator:

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
Thank you very much!  It is working now. 

Once you were able to point out your last piece of wisdom, my fiance was able to help me figure out the last of the math required to do the last thing you suggested.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,081
Members
137,582
Latest member
Spartacraft
Top