• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Zelda Loading Terrain System

Status
Not open for further replies.
Level 2
Joined
Jun 4, 2007
Messages
22
Thanks for everyone helping me with the stupid offset problem.

but i have a greater problem.

my map consists of 4 squares of terrain

[ ][ ][ ][ ]

only one person can be in each unless, the player is called for that certain square.

this is a little hard to explain, im trying to simulate the old zelda where if you went off the side of the map it loaded another piece of map. well doing this with 4 players has come to my attention that this isn't going to be an easy task.

considering i have to know how to detect what square is loaded, where the players are, and where to put the player when he leaves a side of a square, and to create a whole new map piece or to use the one that someone else is using bases if they are using the same piece of land.

for instance:
there are 4 players, each square below represents a piece of map.
Player1=A
Player2=B
Player3=C
Player4=D





[ ][ ][ ][ C]
[ ][ D ][ ][ ]
[ A ][ B][ ][ ]
[ ][ ][ ][ ]

now lets say, player b goes UP in his square, he should be able to join D's square. instead of loading a new piece of land,(don't forget that there are only 4 actual squares of land in my map, i just used more to display the ''map'' of the game.)

Sorry i tried my best explaining my problem, i just want a sorta template i could go by so i can start making my ''map'' which is be hand made using offsets in a region.



NOTE:
I decided to move it here, it seemed more appropriate.
 
Level 2
Joined
Jun 4, 2007
Messages
22
well please take your time if you going to do it, im in no hurry,

im just getting bass information ready for my map, so i understand how to make my map when i start it.

sorry im a little new to this site, i didn't know how to delete it, i figured you guys would pick up on it.

thanks anyway=P
 
you should make every square as a piece on the map, with the "terrain" that you wish, and use locations on each side that, when entered, will go to the "wanted square" which should be a region from the side of where the unit entered but not be the same location for going back to the square that the unit just came from cause then the unit will keep going back and forth forever and probably crash the game.

OR

Easier, make each square a location, and when the unit enters the region, make the camera lock camera bounds to that region. so not actually squares, but the camera will lock to the screen so its like the square.
 
Level 9
Joined
Jun 26, 2007
Messages
659
if i was fighting this problem
this is what i would do:

first four integer arrays
WantedXPos[12] and YPos[12]
WantedXPos[12] and WantedYPos[12]

then in your "i change room" trigger
a unit enter region
local bool RequireNewRoom = true
Set WantedXPos[Player number of owner of triggering unit] = XPos[Player number of owner of triggering unit] +1/0/-1
Set WantedYPos[Player number of owner of triggering unit] = YPos[Player number of owner of triggering unit] +1/0/-1
for (integer A) from 1 to 12 do
if (WantedXPos[Player number of owner of triggering unit]=XPos[integer A] and WantedYPos[Player number of owner of triggering unit]=YPos[integer A])
Set RequireNewRoom = false
if (RequireNewRoom=true)
then // create a new room
else // use the old one
 
Level 2
Joined
Jun 4, 2007
Messages
22
if i was fighting this problem
this is what i would do:

first four integer arrays
WantedXPos[12] and YPos[12]
WantedXPos[12] and WantedYPos[12]

then in your "i change room" trigger
a unit enter region
local bool RequireNewRoom = true
Set WantedXPos[Player number of owner of triggering unit] = XPos[Player number of owner of triggering unit] +1/0/-1
Set WantedYPos[Player number of owner of triggering unit] = YPos[Player number of owner of triggering unit] +1/0/-1
for (integer A) from 1 to 12 do
if (WantedXPos[Player number of owner of triggering unit]=XPos[integer A] and WantedYPos[Player number of owner of triggering unit]=YPos[integer A])
Set RequireNewRoom = false
if (RequireNewRoom=true)
then // create a new room
else // use the old one

Well, i understand about 3/4 of this, but wouldn't i have to make a WantedXpos and a wantedYpos for every player?
 
Level 2
Joined
Jun 4, 2007
Messages
22
Im not so good with looping, i dont quite understand it yet,

could someone make me a real demo of this? i learn best from examples:p

im not quite understanding yoshi's
 
Level 9
Joined
Jun 26, 2007
Messages
659
if i was fighting this problem
this is what i would do:

first four integer arrays
WantedXPos[12] and YPos[12]
WantedXPos[12] and WantedYPos[12]

then in your "i change room" trigger
a unit enter region
local bool RequireNewRoom = true
Set WantedXPos[Player number of owner of triggering unit] = XPos[Player number of owner of triggering unit] +1/0/-1
Set WantedYPos[Player number of owner of triggering unit] = YPos[Player number of owner of triggering unit] +1/0/-1
for (integer A) from 1 to 12 do
if (WantedXPos[Player number of owner of triggering unit]=XPos[integer A] and WantedYPos[Player number of owner of triggering unit]=YPos[integer A])
Set RequireNewRoom = false
if (RequireNewRoom=true)
then // create a new room
else // use the old one
Yes you have, i consider it in this pseudo-code
 
Status
Not open for further replies.
Top