hooglstartup.blogg.se

Game maker player object screen wrap
Game maker player object screen wrap










  1. GAME MAKER PLAYER OBJECT SCREEN WRAP UPDATE
  2. GAME MAKER PLAYER OBJECT SCREEN WRAP CODE

SBaddies = () ĭebug.Log ("Gained: " +sBaddies.GetMyPoints()) //GetMyPoints is a function in scriptBaddies that returns the point value Instantiate(explosion, transform.position, transform.rotation) Void OnCollisionEnter(Collision collision) Transform.Rotate(randSpinX/10,randSpinY/10,randSpinZ/10) Transform.position = new Vector3(,-10,5) Transform.position = new Vector3(-15,5) Transform.Rotate(randSpinX,randSpinY,randSpinZ) Rigidbody.AddForce(new Vector3(randForceX,randForceY,5)) Transform.position = new Vector3(randPosX,randPosY,5) įloat randForceX = Random.Range (-50,50) įloat randForceY = Random.Range (-50,50) and make the baddie start at those coords give our baddie a point value based on its colour Public class scriptBaddies : MonoBehaviourĬase 0: = Color.red break Ĭase 1: = Color.red break Ĭase 2: = Color.red break Ĭase 3: = Color.red break Ĭase 4: = een break Ĭase 5: = een break Ĭase 6: = een break Ĭase 7: = Color.blue break Ĭase 8: = Color.blue break Ĭase 9: = Color.yellow break I tested it multiple times before making the edit. The edit I made yesterday was not incorrect. So none of the baddies instantiated as a result of a split are updating.

game maker player object screen wrap

GAME MAKER PLAYER OBJECT SCREEN WRAP UPDATE

It looks as though for some reason after the second generation the baddies stop using the Update function.Įdit 2: On testing it again this morning it's not wrapping or rotating any of the baddie objects except the very first one. Any baddies beyond those two generations will NOT screen wrap.Įdit: I have just noticed the third generation + baddies also don't rotate. The initial baddie and the two baddies from the split WILL screen wrap. When the baddie is hit, it is destroyed and two more baddies are spawned. To give a little background, the game starts with the player and one baddie.

GAME MAKER PLAYER OBJECT SCREEN WRAP CODE

I am using the same code to wrap game objects for both the player and the baddy objects, but while the player wraps, only first and second generation baddies wrap.

game maker player object screen wrap

I am making myself a very simple game as my first project in Unity and everything in the game is supposed to wrap from left to right and top to bottom (and vice versa).












Game maker player object screen wrap