Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Positioning Character On World Map...

Status
Not open for further replies.
Hi all, I have a problem dealing with the character's sprite on the world map.

In the world map, the character is shrunk down to look correct with the aspect of the tileset - Inq XP WM - World Map.png By: TheInquisitor

Shrinking the character is no problem, but, the character does not fit the Docks or Bridges with the tileset. But is standing lower. What I want to know is if there is a way to specify the X, Y cooridnates of the Character Sprite on the map so that I can lift them up onto the Bridge. I have enclosed a picture which shows what I mean better then this paragraph.
I would rather do this process through a script or editing code rather then editing a tileset and messing the whole thing up.


Any help is Appreciated..!
I hope I posted this in the right place?

Fenwick
 

Anonymous

Guest

I'll have a look.

[EDIT] I don't seem to be able to access the method, I'll continue looking though, unless someone with more knowledge replies first.
 
-= Bump =-

If anyone can help out in the above request, it is well appreciated..

Fenwick

Edit: I am using a script to Shrink the Player on the Overworld/World Map, I would rather not edit the Character(s) graphics if this can be done by editing the default script(s) where ever & which ever the code is to do so. This is much simpler then editing every single Character Graphic/Character Set.
 

Anonymous

Guest

Oops, I was looking in the wrong place.

Here, change the numbers accordingly to suit your sprite and map, I can't give any proper suggestions as I don't have a small sprite.

In Sprite_Character find lines 49 and 50 they should contain this
Code:
self.ox = @cw / 2
self.oy = @ch

Now the self.oy = @ch should end up like it's ox.
Code:
self.ox = @cw / 2
self.oy = @ch / 1.5

Now use points (1.5, 2.5, 0.2, 0.5, you get the idea) also please keep in mind that changing these values will in turn mess up your default sized sprites, but I know an easy way to fix that by using if statements, I will update here when I have time... I have to catch up with work so i'm really busy.
 
The Arbiter;308766 said:
Oops, I was looking in the wrong place.

Here, change the numbers accordingly to suit your sprite and map, I can't give any proper suggestions as I don't have a small sprite.

In Sprite_Character find lines 49 and 50 they should contain this
Code:
self.ox = @cw / 2
self.oy = @ch

Now the self.oy = @ch should end up like it's ox.
Code:
self.ox = @cw / 2
self.oy = @ch / 1.5

Now use points (1.5, 2.5, 0.2, 0.5, you get the idea) also please keep in mind that changing these values will in turn mess up your default sized sprites, but I know an easy way to fix that by using if statements, I will update here when I have time... I have to catch up with work so i'm really busy.

The Arbiter: That did it...! Worked like a charm...!

Now, as stated above, you said there is away using "if statements" to have this effect only the Character's Graphic and not events..? If you have the time, would you be able to slip me that little piece of code.?

Thanks again,
Fenwick
 
If its only appearing to be a problem effect on events, you could do
Code:
if !@character.is_a("Game_Event")
  self.ox = @cw / 2
  self.oy = @ch / 1.5
else
  self.ox = @cw / 2
  self.oy = @ch
end
 
Gubid;309552 said:
If its only appearing to be a problem effect on events, you could do
Code:
if !@character.is_a("Game_Event")
  self.ox = @cw / 2
  self.oy = @ch / 1.5
else
  self.ox = @cw / 2
  self.oy = @ch
end

This worked out great, with an exception to ("Game_event") to ("Game_Player")... Thanks for the help.

This topic can now be closed.!
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top