Well the idea was simple...
This is Map No 001
You are given some building (as items): Building A, B, C and D
You have free spot (which you can place any building) at (2,2), (4,4), (6,6), (8,8)
Your mission is to place:
- Building A at (2,2)
- Building B at (4,4)
- Building C at (6,6)
- Building D at (8,8)
How to track if those building are in the suggested spot?
Thanks.
This is Map No 001
You are given some building (as items): Building A, B, C and D
You have free spot (which you can place any building) at (2,2), (4,4), (6,6), (8,8)
Your mission is to place:
- Building A at (2,2)
- Building B at (4,4)
- Building C at (6,6)
- Building D at (8,8)
How to track if those building are in the suggested spot?
Thanks.
v1.3 2015.12.08 > add method to check event in xy have certain name or not.
> add method to return list of all event in current map that have certain name
this approach will require you to name your template Event.
using conditional branch > script.
add this:
$gameMap.isXyHasEventName(name,x,y);
change name to your event name... can be either string or regexp
change x to coordinate x you want to check
change y to coordinate y you want to check
example:
$gameMap.isXyHasEventName("Red Roof Building", 2, 2); will return true if in coordinate 2,2 you have event named "Red Roof Building"
case sensitive !!!
$gameMap.isXyHasEventName(/Red Roof Building/i, 2, 2); will return true if in coordinate 2,2 you have event named "Red Roof Building"
not case sensitive. meaning that "ReD RoOF BuIlDiNg" will also detected
$gameMap.isXyHasEventName(/Red/i, 2, 2); will return true if in coordinate 2,2 you have event named that contain Red inside the name
so something like "red roof building" "red wall building" is detected.
not case sensitive because of /i. meaning that "ReD" will also detected.
there's also a script call to grab all event with certain name in case someone need it. read the help in plugin editor.
edit: updated the demo for all my plugins. now it contain the latest version.
@DangDut: when your game finished... can you share me the link... i would love to see how this plugin can be used inside a game :D .
btw... dangdut is the music of my country... my country... oh my country... :D .



