freebooter

Veteran
Veteran
Joined
Oct 20, 2017
Messages
104
Reaction score
5
First Language
German
Primarily Uses
RMMV
Hello guys,

I'm working on a camping-map, a map which pops up each time the player uses the camping-skill. On this map all the actors (1-4) should be placed around a campfire.

How can I place actor [ID] to a given coordinate? I only know this command

$gamePlayer.locate(8,8);

which places the party leader. Anybody an idea on how to solve this?

Thanks in advance!
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,003
First Language
English
Primarily Uses
RMVXA
If this map is the same one used each and every time, then you only need to place the player. The other characters would already be there as NPC sprites. Assuming that they all stay sat around the fire, you don't need to do anything more than that. If, however, you want the player to move around, then you would need to use the 'Change Player Followers' command on the transfer event taking them to the map (turn followers OFF) and again when they leave the map (turn followers ON).
 

BlueMoon

Nebula Games Leader
Veteran
Joined
Jan 10, 2017
Messages
363
Reaction score
486
First Language
Italian
Primarily Uses
RMMZ
Using $gamePlayer.locate(x, y), you will move all the party to the selected position. In your campfire map, you can try something like this:

Code:
$gamePlayer.locate(x,y) //First move the party in the x, y, that is the position where you want to place the party Leader;
$gamePlayer.setDirection(d) //If you need to change the direction of the party leader, too;
if($gamePlayer.followers()._data[0] !== undefined) { //Check if the first follower is in the party;
$gamePlayer.followers()._data[0].locate(x, y) //Change the x, y position
$gamePlayer.followers()._data[0].setDirection(d) // Change the direction if necessary;
}
if($gamePlayer.followers()._data[1] !== undefined) { //Check if the second follower is in the party;
$gamePlayer.followers()._data[1].locate(x, y) //Change the x, y position
$gamePlayer.followers()._data[1].setDirection(d) // Change the direction if necessary;
}
if($gamePlayer.followers()._data[2] !== undefined) { //Check if the third follower is in the party;
$gamePlayer.followers()._data[2].locate(x, y) //Change the x, y position
$gamePlayer.followers()._data[2].setDirection(d) // Change the direction if necessary;
}

The d value in the direction can be:
- 2 --> Bottom;
- 4 --> Left
- 6 --> Right
- 8 --> Up

WARNING!
Obviously, if you move by input your character in your campfire map, the follower will try to follow him not remaining in the position you have set for them.
 

freebooter

Veteran
Veteran
Joined
Oct 20, 2017
Messages
104
Reaction score
5
First Language
German
Primarily Uses
RMMV
@Kes and @Gamefall Team : Thanks for your quick replys.
Setting the characters as NPC on the map doesn't work, because I dont know which character sprites the gamer chose.

But the script code works like a charm. Thanks for that! Just one point: Moving on the map I dont show the followers. But I have to show them on the camping map to set the chars to their places around the fire. How can I toggle on/of the party-follow-mode with a script command?
 

BlueMoon

Nebula Games Leader
Veteran
Joined
Jan 10, 2017
Messages
363
Reaction score
486
First Language
Italian
Primarily Uses
RMMZ
If you're meaning to show and hide them, you can use these script calls:
Code:
$gamePlayer.showFollowers() //Show followers;
$gamePlayer.hideFollowers() //Hide followers
 

freebooter

Veteran
Veteran
Joined
Oct 20, 2017
Messages
104
Reaction score
5
First Language
German
Primarily Uses
RMMV
Yes, that's exactly what I meant. Thanks.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,003
First Language
English
Primarily Uses
RMVXA
Those scriptcalls for showing/hiding followers replicate the commands on tab 2 that I referred to. You can chose to do it by script call or by ordinary event command.
 

Latest Threads

Latest Posts

Latest Profile Posts

since all my maps are hand drawn... I admit, I super envy those who can make the tileset's work. I'm garbage at mapping, but slightly less bad at just drawing my own areas. plus it's easier to draw my own sprites than edit others to look like my characters.
Guys, I made a trailer! And, I also launched the Steam page! If you would like to support the game, please Wishlist it :ahappy: ->
working on some tilesets _ノ乙(、ン、)_

CIBl8xT.png


Oq8WKHX.png
aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v

Forum statistics

Threads
117,284
Messages
1,106,127
Members
153,468
Latest member
fachry3
Top