How to make entity in specific area?

Map is Oasis City Center, I want to make each team icons in front of each team home like minion in lol. You know, except center point, each team’s front garden…
I memorized vectors of corners of each area.

176, 187 210, 214

151, 204 188, 240

  Center Point

105, 257 140, 288
81, 272 115, 312

each vectors are (x, z), I didn’t wrote y vector because all y vectors are between (1, 4).

When creating random vectors, I wrote limit based on that vectors, but result was not what I think. All icons were created at only one area. Do I need to use distance difference from each home or math formula calculating distance from center…

If all icons were created at only one area, that means the position of all the icons that you created are all still 0, 0, 0, which means all of them will spawn at the center of the map

You can try to look at the Workshop Inspector, to further check why the icons’ positions may be like that

If you see that the position of the icons still match the vectors that you listed, i think you should recheck your vector positions, You can physically go to that corner inside the map in game and you can get the vector of your position with red dot camera icon button near the position dropbox right next with “Vector”, so you can be further accurate with your vectors

No, area is not the position of created icon, it’s area based on low limit and high limit in which I create icons.

Here is limit to make random vectors:
Set Global.x_low_limit = …
Set Global.x_high_limit = …

And I Here is random vector used to create Icon:
For (Global.i, 0, size, 1)
Set Global.icon_vectors[i](Vector(Random(Global.x_low_limit, Global.x_high_limit), Random(Global.y_low_limit, Global.y_high_limit, …)))

Here I create Icon:
For (Global.i, 0, size, 1)
CreateIcon(Position(Global.icon_vectors[i]), …)

I made two area which is like soccer field of both team, divided by half line.
I made 20 icons on the both areas, but it’s not positioned on both area equally.

Ohh, i might have misunderstood your concern, but I haven’t actually tried using the “For Global/Player Variable” Action in my workshop experience so at the moment, I don’t really know what could be the proper solution but I do understand the use of the action though, I just dont use it that much and havent fondled with it so I don’t think I would know the solution to it yet

You would need to find points,vectors or coordinates within that area, with a formular. Maybe you can accomplish a benefitting one with cheap processing time guided by some methods i found on the website of stackoverflow, unfortunately my trust level isn’t high enough to post a direct link to external sites. Search the web of your concern if you havem’t yet to obtain the formular you need. For reference @Shanalotte posted on another thread a method to check if an entitiy player overlaps with an area to create zone like trigger shapes of any kind you may need. Link to the post here: [Help] How can i check mathematical area? - #4 by Shanalotte-21334

2 Likes

thanks, it’s what I’m finding

1 Like

Also don’t forget to set reevaluation to just Visible To option when creating effect entities in a loop, when those effects should be static and won’t move around that much.

2 Likes

If I want to make entity in random position in specific area, method is
1. make entity in random vector with limits and check if it's in the area
2. use some formula to get random vector inside the area ?
I can use only 1 method with checking area formula, which takes more actions than it need if it’s not in the area.