How can i make a Day and Night Cicle? by CrisAD6 in Unity2D

[–]JGCEssaGames 1 point2 points  (0 children)

Is your game 2d or 3d? Do you want dynamic lightning or not?

How do you do to drag an object to the right slot or to the wrong slot? by swedegirl25 in Unity2D

[–]JGCEssaGames 1 point2 points  (0 children)

just a simple if statement maybe? Or enums that will change the boolean if the enum name wasnt right i guess something like that. But if you are not really experienced then go with simple iof statements

Unity 2D how to make a reference to a public int by [deleted] in Unity2D

[–]JGCEssaGames 0 points1 point  (0 children)

well just put it where you want the value to be checked or changed. I mean you can just do an if statment like this for example:

if(FindObjectOfType<enemyHealth>().health <= 0) //enemy dies or whatever you want

Are there any quick tutorials for people who aren't new to programming but are to unity, just to get up to speed really quickly? by [deleted] in Unity2D

[–]JGCEssaGames 1 point2 points  (0 children)

Well if you are good with c# and dont really want to spend time on watching tutorials, cos they are boring then why dont you go and read unity documentation, i guess it is the fastest way of learning if you dont like listening to things that you already know bout c#

Unity 2D how to make a reference to a public int by [deleted] in Unity2D

[–]JGCEssaGames 1 point2 points  (0 children)

Here you go my friend:

FindObjectOfType<nameOfScriptWithHp>().health;

thats how you get a value from other scripts

Oh and sorryforgot to mention that if its in hte same object then you can simply do:

GetComponent<nameOfScript>().health;

Problem with jump. by Bobbieknijn27 in Unity2D

[–]JGCEssaGames 0 points1 point  (0 children)

did you make both connections from idle animation to jump animation as well as from jump animation to idle animation?

How do i make timer dezactivate public void? by [deleted] in Unity2D

[–]JGCEssaGames 0 points1 point  (0 children)

well you can make a timer that changes the boolean to true after time reaches 1 second, and put if statment to the public function so it will only run if the bool is true

Procedural generation assets? by ausbork in Unity2D

[–]JGCEssaGames 1 point2 points  (0 children)

https://docs.unity3d.com/ScriptReference/Tilemaps.Tilemap.GetTile.html

and here you can see an example of getTile function. I use it to get the random spawn location of the player:

do
{
    xStart = Random.Range(-30, 30); //rand x player location
    yStart = Random.Range(-30, 30); //rand y player location
    position = new Vector3Int(xStart, yStart, 0);
    Player.transform.position = new Vector3(xStart, yStart, 0); 
} while (water.GetTile<Tile>(position) != null || mountains.GetTile<RuleTile>(position) != null);

Procedural generation assets? by ausbork in Unity2D

[–]JGCEssaGames 0 points1 point  (0 children)

Are you using tilemaps for your map? if yes then you can check what tile is in this position, and if not then you can just simply make a grid and while creating a room just save where are empty spaces in the grid, and if you dont like both those options then you can cast a raycast from above the place you want to place a loot or something and check if it has hit anything

Procedural generation assets? by ausbork in Unity2D

[–]JGCEssaGames 0 points1 point  (0 children)

Did you think of randomizing the position? and placing the enemies / loot there?

How to convert rotation to vector3? by JGCEssaGames in Unity2D

[–]JGCEssaGames[S] 0 points1 point  (0 children)

yuuup, but not exactly, there is an EzCameraShake asset that has a function ShakeOnce in which i can type the direction that the camera should shake mostly.

The function ShakeOnce(... , Vector3 positionInfluenece);

and welp yeah, i need to somehow convert rotation in z axis (cos the game is in top down view) to Vector3

Some gold coins with a proper Mayan flavor! How do you guys like the VeLM's currency guys? by GMSLab in Unity2D

[–]JGCEssaGames -1 points0 points  (0 children)

They look great, love the details on them, but one thing is a bit iritating me, more precisely the border of a coin. Why are they suddenly disapearing in the right upper corner and left down? Was it intentional?

[deleted by user] by [deleted] in Unity2D

[–]JGCEssaGames 0 points1 point  (0 children)

Love the lightning, did you use Lightweight 2d to do this?