09-22-2010, 05:42 PM
Hi!, it's me and my loop again!
So, i really need to know how to properly script a loop, a loop that waits for player inputs. For example, let's say i want to add impulse to an object from the moment the player collides with area1 until the moment he collides with area2, how would i do that ? Or, better, how would i do if i want the loop to be effective at map start ?
I didn't came here without first trying myself with the knowledge i have, but i must admit i made the game crash each time i tried.
I don't need to know about while or do, or for, but i want to know where to place things. Where to place the loop? Inside a function i make or inside OnEnter or Onstart? I tried both, with no success. I know i need a break condition, and i have one, but still the game crashes.
So, please help me.
So, i really need to know how to properly script a loop, a loop that waits for player inputs. For example, let's say i want to add impulse to an object from the moment the player collides with area1 until the moment he collides with area2, how would i do that ? Or, better, how would i do if i want the loop to be effective at map start ?
I didn't came here without first trying myself with the knowledge i have, but i must admit i made the game crash each time i tried.
I don't need to know about while or do, or for, but i want to know where to place things. Where to place the loop? Inside a function i make or inside OnEnter or Onstart? I tried both, with no success. I know i need a break condition, and i have one, but still the game crashes.
So, please help me.