Building the game in Unity - Discussion

carlos I did everything as in the video I had to stop the video 500xs I always had the same results as in the videos and just failed now, I stopped the course because of this and I wish I could go ahead with the problem solved, I already made the code available on this page for see that it’s the same as the video

1 Like

yes if they give the code its more simple

Correct, have you try to restart the entire jump lesson? I mean there are 3 jump video lesson, would you was able to make it jump at least 1 time? and then i assume you continue with the next video (advance jumping) and then start failing right? My point is: are you sure that before the lesson it was working good? because that will give us a clue on where/when your code start failing.

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

carlos I did everything as in the video, the code its there, can you see the code? its the same

1 Like

I’m getting an error message when I try to create and save project “error launching the editor.licance is invalid”.
What does it mean? I’m on MacBook Air.

1 Like

Yes, but before the double or triple jump, was the jump working? the normal jump?

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

Hey @carolyn, hope you are ok.

Have you tried to reinstall the editor? maybe you got something missing, apparently is a problem with the software license.

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

Hello guys! Is anyone having issues creating a tile palette in Unity? I’ve been trying for a while and can’t find a way. Cheers!

1 Like

Hi @Ernest_SG, hope you are well.

Now what kind of issues you are facing? maybe an screenshot could help us to find a solution :nerd_face:

Carlos Z.

Hey Carlos, thanks for helping! So I’ll leave down below a thread of screenshots.

1-Open Tile Palette

2-Input name, and manually change the cell sizes.

3-Choose a folder to save “My Palette”

4-The palette hasn’t been created, no new files shown, and I cannot drag anything onto the tile palette.

Hopefully you can help me sort this one out. Appreaciate it.

1 Like

Ok, have you tried with different tile files? might be that your files are corrupted?
Also have you tried another functionality? I mean how sure you are that is only the tile palette that is not working? if is only the palette thats ok, could be the files you are using, but if you can’t use any other functionality it could be an issue with the software (which i doubt)

Carlos Z

When I install hub and then try to install unity , each time I got : something went wrong,it fails ? @ivan

1 Like

Hi @Oussama, hope you are ok.

Could you please share an screenshot showing the error message? might be useful to help the solution.

Carlos Z

I fixed the problem, thank’s

1 Like

Please Help, I am stuck at the instilation section already >.^ “error launching the editor. License is invalid”

Never mind I will google my problems first from now on :smiley:

1 Like

In case your still having the issue, let us know to help you solve it :nerd_face:

Carlos Z

Hi. Can we please have an updated version for this course. 2020.3 Version is completely different
Thanks

2 Likes

Hey @CryptoMel, hope yoy are great.

We are updating some of our old courses, it takes time to re-record all videos again, but its on our list of updating content, I cant tell you when exactly because I do not manage the course content creation but I’m sure we will update it when the time comes :nerd_face:.

Carlos Z

2 Likes

Hi Carlos. I have managed to create something fun and now I am trying to expand the idea but running into some problems that has been halting me for days, I’ve managed to find a solution, in English, but I need help translating that to code :smiley:

I have a random map generator, that is called by the game manager to generate a ‘genesis’ map on each 8 sides (corners included) of the center map. To add complexity, the bottom center and left generates 'snowLands", the left center and top generates ‘grassLands’, top center and right generates “groundLands”, and finally, right center and bottom generates “rockLands”. Each different type of land is generated by it’s associated ‘type’-MapGenerater GameObject that has their choice of prefabs to generate the map to favor the type of land, and spawn appropriate trees and so forth, all connected to the same map generator script.


using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class MapGenerator : MonoBehaviour

{

public int width=15, hight=15;

public GameObject [] tileFabs;

public float tileOffset = 10f;

public GameObject wallTile;

public GameObject tree;

public GameObject enemyPrefab;

public GameObject lockedMapOverlay;

public GameObject trigger;

// Start is called before the first frame update

void Start()

{

    

}

// Update is called once per frame

void Update()

{

    

}

public void GenerateMap(int xOffSet, int yOffSet)

{

    for(int x=0; x<width; x++)

    {

        for(int y=0; y<hight; y++)

        {   

            Vector2 pos = new Vector2((x+xOffSet)*tileOffset, (y+yOffSet)*tileOffset);

            if (x==0 || x==width-1 || y==0 || y==hight-1)

            {

                Instantiate(wallTile, pos, Quaternion.identity);

            }

            else

            {

                int rnd = Random.Range(0, tileFabs.Length);

                Instantiate(tileFabs[rnd], pos, Quaternion.identity);

                int shouldInnerTile = Random.Range(0, 5);

                int shouldTree = Random.Range(0, 50);

                

                if(shouldInnerTile == 0)

                {                    

                    int rndInner = Random.Range(0, tileFabs.Length);

                    GameObject go = Instantiate(tileFabs[rndInner], pos, Quaternion.identity);

                    go.transform.localScale = new Vector3(1f,1.1f,1);

                }

                

                if (x==(width/2) && y==(hight/2))

                {

                    Instantiate(lockedMapOverlay, pos, Quaternion.identity);

                    Instantiate(trigger, pos, Quaternion.identity);

                }

                else if(shouldTree == 0 && rnd < 7)

                {                    

                    GameObject go = Instantiate(tree, pos, Quaternion.identity);

                    go.transform.localScale = new Vector3(2f,2f,1);

                } 

            }     

        }

        

    }

}

}

When a map type is generated, it creates an associated GameObject trigger type in the middle of the map, that has a child gameobject “MapOverlay” covering the map with a collider. Each Trigger located in the center of each map has the same LandTriggerScript.

===================================
using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class LandTriggerScript : MonoBehaviour

{

public bool isLandOpen = false;

public bool hasNorthLand = false;

public bool hasEastLand = false;

public bool hasSouthhLand = false;

public bool hasWestLand = false;

public bool hasNorthEastLand = false;

public bool hasSoutEastLand = false;

public bool hasSouthWestLand = false;

public bool hasNorthWest = false;   

public void PrepareTriggers()

{   

    private GameObject[] adjacentTriggers; 

    Collider[] triggers = Physics.OverlapSphere(transform.position, 30);

    foreach (Collider col in triggers) 

    {

        if (col.gameObject.tag == "MapTrigger")

        {

            /*adjacentTriggers += triggers;*/

        }

    }

   /*for(a = 0 ; a < adjacentTriggers.length; a++)

   {

       //if the gameobject's x axes is smaller than transform's x value, but same y, set the transform's hasWestLand boolean true,

            //as well as the opposite side for the target game object...and so on for all 8 sides.

        //check if adjacent land is open, open only if it is either north/east/south/west and set their isLandOpenValue to true.

            //create closed adjacent lands to the newly open land where there is no land on all 8 sides.

   }*/

}

}

============================

GenesisMaps

My center map has 4 triggers, one for each side, and their Booleans are set accordingly.

This is where I need help…

When isLandOpen goes to true (when an adjacent land’s trigger is triggered), The Overlay will be turned off and access will be granted to the map.

The newly open map must then also Check (in range) the surrounding area for adjacent maps to see if it has to generated a map on the sides that are “false” (based on probability of type) and turn those Booleans true

When the newly founded map’s center trigger is triggered, it will open all adjacent lands (accept corners, and lands that have already been opened), and generate new locked land on the border of those open lands, where lands have not yet been generated.

What is the smart way to do this?

edit I have a little guy that can run around and slash his sword in all directions, I have spawners that spawn enemies, grant exp, I have stats window to check max hp, current hp and xp shown in bars… that portal in the corner goes to a minigame where you can try to upgrade your weapon, but this causes the monsters to get stronger. I’ll be adding resource gathering and building tools. as well as spells and so on, Claim land by killing the enemies, see resources start to spawn, build the land or have resources flourish, expand the land outwards, having inner lands develop faster than the newly claimed lands on the edges. strengths and weaknesses among types require cross land trading, and alliances. I need more people to be excited about this idea so LET ME KNOW! ****

1 Like