Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Juz10_gameguy on June 17, 2016, 02:11:03 am

Title: [XP] Place objects from Tileset on map script
Post by: Juz10_gameguy on June 17, 2016, 02:11:03 am
Hi, I don't have much scripting experience so was hoping someone could help me with a hopefully simple script for my game. I need a script that will allow me to place objects from my tileset into the game during gameplay.

So for example during gameplay you come across an empty lot. A carpenter in town will build a house for you on that empty lot for 5000 gold or whatever. I was wondering if it was then possible to say have a switch called "house built" or whatever activate, which would then call a script and make a house appear in the empty lot. The house would obviously be premade already and be found on the tileset. I hope I am making myself clear for what I am asking. Is this possible via a script?
Title: Re: [XP] Place objects from Tileset on map script
Post by: Blizzard on June 17, 2016, 02:23:45 am
You should check the script database: http://database.chaos-project.com
Title: Re: [XP] Place objects from Tileset on map script
Post by: schmoggi on June 17, 2016, 06:19:51 am
Hey,

you can swap Tiles on your Map with the following call script:

$game_map.data[x, y, layer] = ID


x = map_x position
y = map_y position
layer = Map Layer, it starts with 0 for Layer 1
ID = Tile ID from your Tileset, starting with 384 for the first Tile below Autitiles in the left upper Corner

Though, i don't know if the changes on the Map are saved in the save File. I can't test it yet because i'm not at home. If not, maybe some friendly Scripter could edit it so the changes are saved.

greetz
Title: Re: [XP] Place objects from Tileset on map script
Post by: Blizzard on June 17, 2016, 09:00:27 am
Nope, they aren't changed. But depending on what exactly it is he is trying to do, he's better off with a full script. e.g. if he wants a script where you can build your own house.
Title: Re: [XP] Place objects from Tileset on map script
Post by: Zexion on June 18, 2016, 10:03:07 pm
Another trick is to just take a screenshot of the house on the lot and use it as an event graphic. Requires a bit of paint and cropping but nothing too hard and no scripts needed either.