SumRndmDde's Summon Plugin Help with Summon Position

Heya peeps! Got a lil' problem here I'm stumped with. I have a skill that allows summoning of Actor 15 which works fine when I want to summon a single one. However, I am trying to summon up to 3 of them (There is only one summoned every Skill use). I would like them to all have a different Y based on whether or not there's an Actor 15 at master._homeY, (master._homeY - 30) or (master._homeY - 60). No idea how I could do that though. I'm also using a bunch of Yanfly's plugins, if ever. Thank you, guys!

Code:
<Summon>
Actor ID: 15
Level: 1
X: master._homeX - 120
Y: master._homeY
<End Summon>
When you use the skill make it add +1 to a variable X (in common event).
Then your Y position is master._homeY - 30*$gameVariables.value(X)
First time x is 0 which gives 0, second time x is 1 which gives 30 and third time x is 2 which gives 60.
At the end or start of battles set that variable X to 0.
Hey, thanks for your reply! I've set all that up, however I get the following error whenever I try using the skill x)

1737901208521.png
he didnt mean X literally. you were to replace X with the id for whatever variable you chose the common event to increase
<Summon> Actor ID: 15 Level: 1 X: master._homeX - 120 Y: master._homeY <End Summon>
im willing to be the variables its looking for is a lowercase x: and y:
Hey, it works!
he didnt mean X literally. you were to replace X with the id for whatever variable you chose the common event to increase
Thanks, I'm kinda dumb for not catching that HAHAHA Haven't tried getting into Common Events just yet.
When you use the skill make it add +1 to a variable X (in common event).
Then your Y position is master._homeY - 30*$gameVariables.value(X)
First time x is 0 which gives 0, second time x is 1 which gives 30 and third time x is 2 which gives 60.
At the end or start of battles set that variable X to 0.
Thanks, mate, it works great! However, now they never stop spawning lower. Any idea on how they can check which place is free before spawning?
So do you mean that when a summon dies or leaves in battle you can replace it? I quickly looked at the code and it seems to me (I'm not a coder 😀 ) that it's setting an array index of the coordinate to true when you summon. But it looks to me it uses the same array for both x and y? Like:
BattleManager.summonsXPositions[y] = true;
So I think you can put conditionals into the y-position formula where you check like:
if (!BattleManager.summonsXPositions[master._homeY]) then you give your position master._homeY and continue with elses.

edit: if that doesn't work, I leave the rest to the coders here LOL
So do you mean that when a summon dies or leaves in battle you can replace it? I quickly looked at the code and it seems to me (I'm not a coder 😀 ) that it's setting an array index of the coordinate to true when you summon. But it looks to me it uses the same array for both x and y? Like:
BattleManager.summonsXPositions[y] = true;
So I think you can put conditionals into the y-position formula where you check like:
if (!BattleManager.summonsXPositions[master._homeY]) then you give your position master._homeY and continue with elses.

edit: if that doesn't work, I leave the rest to the coders here LOL
Heya, thanks for your reply, I really appreciate the help!

I've tried for a bit to make it work out the way you said, however I have no idea how the syntax works for SRD's plugins. I tried the following (Simplified it to test it out) and was met with the "Unexpected End of Input" error. Any ideas what I did wrong? x)
Code:
Y: if (!BattleManager.summonsXPositions[master._homeY]) {
5
} else {
100
}
Maybe this way?

Code:
if (!BattleManager.summonsXPositions[master._homeY]) {
  y = 5
} else {
  y = 100
}

Or shorter:
Code:
y = !BattleManager.summonsXPositions[master._homeY] ? 5 : 100
Maybe this way?

Code:
if (!BattleManager.summonsXPositions[master._homeY]) {
  y = 5
} else {
  y = 100
}

Or shorter:
Code:
y = !BattleManager.summonsXPositions[master._homeY] ? 5 : 100
Gives back the same error, unfortunately, but thank you x)
Did you put it all in the same line? I tested this and it works for me (all on same line):

Y: if (!BattleManager.summonsXPositions[master._homeY]) {master._homeY} else if(!BattleManager.summonsXPositions[master._homeY+30]) {master._homeY+30} else {master._homeY+60}

Original thread: https://forums.rpgmakerweb.com/threads/sumrndmddes-summon-plugin-help-with-summon-position.174958/