- Joined
- Aug 17, 2018
- Messages
- 16
- Reaction score
- 0
- First Language
- Filipino
- Primarily Uses
- RMMV
Hi everyone,
Great day! I am trying to make a diamond grid nested loop but I have a problem with it. There are excessive events created that are more than the desired diamond grid. Kindly check the attached files for the picture. Here are my event commands and scripts:
Control Variables : #0003 map.start = Map ID
Control Variables : #0001 player.start.x = 1
Control Variables : #0002 player.start.y = 1
Control Variables : #0006 player.walk.min = Random 0..7
Control Variables : #0007 player.walk.max = $gameVariables.value(6)+Math.randomInt(7-$gameVariables.value(6)+1);
Transfer Player : {map.start}({player.start.x},{player.start.y})
Script : Galv.SPAWN.overlap = 'chars';
Control Variables : #0014 player.walk.tilex = 0
Control Variables : #0015 player.walk.tiley = 0
Control Variables : #0014 player.walk.tilex += player.walk.min
Control Variables : #0015 player.walk.tiley = 0
Loop
If : player.walk.tiley <= player.walk.max
Loop
If : Script : $gameVariables.value(14)<=$gameVariables.value(7);
Script : Galv.SPAWN.event(3,$gameVariables.value(1)+$gameVariables.value(14)-$gameVariables.value(15),
$gameVariables.value(2)+$gameVariables.value(15));
Script : Galv.SPAWN.event(3,$gameVariables.value(1)-$gameVariables.value(14)+$gameVariables.value(15),
$gameVariables.value(2)-$gameVariables.value(15));
Script : Galv.SPAWN.event(3,$gameVariables.value(1)+$gameVariables.value(14)-$gameVariables.value(15),
$gameVariables.value(2)-$gameVariables.value(15));
Script : Galv.SPAWN.event(3,$gameVariables.value(1)-$gameVariables.value(14)+$gameVariables.value(15),
$gameVariables.value(2)+$gameVariables.value(15));
: Else
Break Loop
Jump to Label : After Loop X
: End
Control Variables : #0014 player.walk.tilex += 1
: Repeat Above
Label : After Loop X
Control Variables : #0014 player.walk.tilex = player.walk.min
: Else
Break Loop
Jump to Label : After Loop Y
: End
Control Variables : #0015 player.walk.tiley += 1
: Repeat Above
The image I used for the diamond grid is the dog. Please help me remove the excessive dog events created.
Great day! I am trying to make a diamond grid nested loop but I have a problem with it. There are excessive events created that are more than the desired diamond grid. Kindly check the attached files for the picture. Here are my event commands and scripts:
Control Variables : #0003 map.start = Map ID
Control Variables : #0001 player.start.x = 1
Control Variables : #0002 player.start.y = 1
Control Variables : #0006 player.walk.min = Random 0..7
Control Variables : #0007 player.walk.max = $gameVariables.value(6)+Math.randomInt(7-$gameVariables.value(6)+1);
Transfer Player : {map.start}({player.start.x},{player.start.y})
Script : Galv.SPAWN.overlap = 'chars';
Control Variables : #0014 player.walk.tilex = 0
Control Variables : #0015 player.walk.tiley = 0
Control Variables : #0014 player.walk.tilex += player.walk.min
Control Variables : #0015 player.walk.tiley = 0
Loop
If : player.walk.tiley <= player.walk.max
Loop
If : Script : $gameVariables.value(14)<=$gameVariables.value(7);
Script : Galv.SPAWN.event(3,$gameVariables.value(1)+$gameVariables.value(14)-$gameVariables.value(15),
$gameVariables.value(2)+$gameVariables.value(15));
Script : Galv.SPAWN.event(3,$gameVariables.value(1)-$gameVariables.value(14)+$gameVariables.value(15),
$gameVariables.value(2)-$gameVariables.value(15));
Script : Galv.SPAWN.event(3,$gameVariables.value(1)+$gameVariables.value(14)-$gameVariables.value(15),
$gameVariables.value(2)-$gameVariables.value(15));
Script : Galv.SPAWN.event(3,$gameVariables.value(1)-$gameVariables.value(14)+$gameVariables.value(15),
$gameVariables.value(2)+$gameVariables.value(15));
: Else
Break Loop
Jump to Label : After Loop X
: End
Control Variables : #0014 player.walk.tilex += 1
: Repeat Above
Label : After Loop X
Control Variables : #0014 player.walk.tilex = player.walk.min
: Else
Break Loop
Jump to Label : After Loop Y
: End
Control Variables : #0015 player.walk.tiley += 1
: Repeat Above
The image I used for the diamond grid is the dog. Please help me remove the excessive dog events created.