• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Create Regions Upon Trigger?

Status
Not open for further replies.
Level 1
Joined
Feb 18, 2012
Messages
3
New here, First Post.
So I am attempting at making a map to be like the game Lost Labyrinth(BlitzBasic Edition).

So essentially in the game you descend maze like labyrinths getting down further and further into the labyrinth. There is no real end. With each labyrinth being created randomly just before you enter it.

I wish to make the map be created with a modifier algorithm(which I'm still trying to work out), that would create a new a different labyrinth each time a player loads the game or goes down a level.

Now the levels progressively get bigger, thus the regions required for each progressive labyrinth grows in number.

My question to the community here is this:
Can I create regions through triggers?
OR
Can it be done in JASS? or should I just set a 125 grid by 125 grid(meaning maximum labyrinth size) of 256by256 blocks and then just work region by region(which I would rather cut down on repetitive coding by having it automated sequencing of created regions).


Anyway, Please help.
Also if you have any better ideas on how I should go about creating this game, Then please say so.

ScreenShot of the game I am trying to emulate on Warcraft 3
03eb2ad90c2f08.gif
ScreenShot of what it looks like so far
19022012ll.jpg


Cheers
Aruno
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
What are called regions in GUI are rects in JASS

local rect r = Rect(minX, minY, maxX, maxY)

Regions
JASS:
local region reg = CreateRegion
local rect r = Rect(minX, minY, maxX, maxY)
call RegionAddRect(reg, r)

There's also RegionAddCell(region,x,y)
Maps consist of cells of size 128x128, each ground tile reserves one cell for example

You might not even need rects/regions, you could use coordinates. You could calculate the center x and y of each cell and store them. You could use two loops, minX and minY of the map, automate the script.
 
Status
Not open for further replies.
Top