Retrieving items
-
- Prole
- Posts: 1
- Joined: Wed May 15, 2013 6:40 pm
Retrieving items
Hi guys, i'm new to the forum, and lurked for a couple days, but i can't seem to find anything about how to handle placing and picking up items. for an example, in Snake, the goal is to eat the mouse, but the snake is not supposed to run into itself. how would i randomize the placement of the mouse after the previous one has been eaten? thanks in advanced.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Retrieving items
You just need a bit of randomness in your constant world.
See math.random section in this article.
See math.random section in this article.
Who is online
Users browsing this forum: No registered users and 1 guest