Author Topic: My First Map- Trouble already!  (Read 5474 times)

0 Members and 1 Guest are viewing this topic.

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 148
Re: My First Map- Trouble already!
« Reply #60 on: January 09, 2012, 06:22:59 AM »
I'm having another problem I can't figure out:

Rather than assigning player seedlings to an asteroid, I'm allowing the game to randomly populate an asteroid at the start. For some reason, that asteroid is shrunken down to a tiny radius, and the asteroid stats revert to a straight 50% value. The assigned radius and stats in LevelSetup are being overridden on the player asteroid. . The send distance is still good, however. All other asteroids are normal. Does anyone know why this is happening or how to overcome it? I'd like the player to spawn on a random asteroid each time they play.

collapsoul

  • No Intel Inside
  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
  • a bot in a human disguise
Re: My First Map- Trouble already!
« Reply #61 on: January 09, 2012, 07:46:36 AM »
I'd like the player to spawn on a random asteroid each time they play.
What if you try to control it manually?

Function prototypereturn typeDescription
GetRandomAsteroid()AsteroidGet any asteroid in the current game, at random.
GetRandomRangeAsteroid(start, end)AsteroidGet a random asteroid from the given range of IDs (start is inclusive, end is exclusive, so e.g. a range of (4, 10) would select a random asteroid from the asteroids with IDs of 4, 5, 6, 7, 8, and 9)
GetRandomEmptyAsteroid()AsteroidGet a random asteroid in the game that is empty (that is, it has no trees or seedlings on it and is owned by the grey team)
GetRandomRangeEmptyAsteroid(start, end)AsteroidGet an empty asteroid from the given range of asteroid IDs.

They should work at LevelSetup stage, at least first of them does
You never get involved in a pig fight. If you do, three things happen: you get dirty, you get tired, and only the pig has fun.

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 148
Re: My First Map- Trouble already!
« Reply #62 on: January 09, 2012, 10:29:42 AM »
I wasn't sure how to actually use these functions to solve my dilemma and was not having any success, so I checked to see if someone used one in a map. After searching a dozen or so I found Mihhaelo's Night Stalkers map where he used GetRandomRangeEmptyAsteroid. Copying that, I seem to have solved the problem. It works like a charm! Thanks for the suggestion- it's a great relief. Now I can move on to more fun parts of finishing a new map.

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 148
Re: My First Map- Trouble already!
« Reply #63 on: July 13, 2012, 07:10:15 AM »
Since there is so little activity on the forum and I don't have time to make a new map, I thought I'd post my very first experimental map for those itching for something new. It was originally made primarily as a learning tool for myself so I could learn about LUA, and although I abandoned it's development long ago, it is playable.

Despite many attempts, I was never able to make the gameplay satisfactory. I wanted to make a "King of the Hill"-type map, but found it too difficult to overcome the game's innate desire to expand rather than hold a specific asteroid. I could artificially replicate that behavior, but then had trouble balancing the difficulty level so as not to be too easy or too difficult for the player. I also wanted to experiment with visual indicators the player could use to monitor the game's progress. I tried to make a map that could be played in a short period of time, and that would also be relatively fast-moving in it's gameplay.

Give it a whirl. It will randomly pit the player against 1 to 3 opponents. You may find it a challenge- or not.