Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

[SOLVED] Grid drawing

Hello everybody
I'm desiigning (right) a movement based grid system for my game. I already did the math necessary for it and I even also got it to display it on map using the BindPictureToMap script to tie a picture to every tile where the grid must be displayed.
So 'why are you here you might wonder'. The issue is that the script do not work when the plugin is called from common event. So I would like to know if there is a script call or a work around to draw a picture or a sprite tied to a specific tile (x, y) of a map, which works when called in common events ?
PS: I don't know if it was intentional or a bug but I already point that in the appropriate forum but since the author has been inactive for a long time I came here for help. I'm just asking for a way to display a picture tied on a map.
 
The plugin command
JavaScript:
START_BindPicturesToMap below_characters
So that for the event called all the following pictures will be tied. Actually I copy/paste the code from an event on the map which was displaying the grid perfectly and pasted it on a common event an then called the common event from the map via an normal event. But didn't work.
 
Sorry my french isn't very good have you tried adding this script into a command:
BindPictureToMap [PICTURE NAME] below_weather

Like:
BindPictureToMap 20 below_weather

After you've done the picture setup.
 
Whaou I tested it an it actually worked. Now the problem is that i use script calls to draw the grid's pictures because of the rmmv limitation on pictures. That's why I used the STARTBindPicturesToMap command since it doesn't ask for the picture id. Now that i can't use that anymore, I need the script call to use for the BindPictureToMap command so that i can use $gameVariables.value() instead of picture id. If you could help me with that. (I'm not that good with scripts)
Thks for your help and your directions
 
Hmm I know exactly what you mean.

Now the way I did it was by changing the element with some code. I code write you up something that would enable you to do that, that wouldn't be difficult to use, or at least any more difficult than it is now. Give me a little time.
 
That would be awesome. I actually didn't know I needed some more code 'cause I thought plugin commands were simplified shortcuts for script calls. Anyway take your time since I started the post today and will get an answer today (really rare for me). Thanks again.
 
It's simple, didn't think it was at first but that was because I was going to long way round.

Simply put this:
$gameInterp.pluginCommand("BindPictureToMap",[20,"below_weather"]);
into script.

Then the 20 would be replaced with $gameVariables.value(NUMBER) so:
$gameInterp.pluginCommand("BindPictureToMap",[$gameVariables.value(NUMBER),"below_weather"]);
and below weather to the layer provided it's within the ""

Update: In a script please
 
Last edited:
Thank you but I'm Not sure if I'm doing anything wrong. But I put your code in a script call after creating the picture and I got a reference error saying that: $gameInterp is not defined.
 
My bad forgot this:
var $gameInterp = new Game_Interpreter();
That's the first line what I sent before is the second.

Forgot that was need because I put it in a plugin.
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
If I recall correctly(it's been awhile) but I'm pretty sure the Game_Interperter is what handles script calls and plugin commands so essentially you could do this instead of declaring the variable beforehand. I've never tested it but it would save you an extra line of code for each call.

JavaScript:
this.pluginCommand("BindPictureToMap",[20,"below_weather"]);
 
Yesssssss it worked. Thank you LTNgames and espacially you my LordBones (jolly)since you helped me with this all day. Thanks to you two I solved my issue and I got to learn a bit more scripting today. I think you can close this since it's solved.
Thank you again; great helping community.
 
Top