Jump to content


Photo

Creating a game for my course.


  • Please log in to reply
3 replies to this topic

#1 Theextract

Theextract

    GMC Member

  • New Member
  • 7 posts
  • Version:GM7

Posted 28 May 2012 - 01:17 PM

Im creating a very easy to understand game. i have made objects that look like potholes and i want other objects to randomly replace them to make a "hit the hole" kind of game does anyone know what options i need or script. please explain how i can make an object to randomly replace one of the potholes. thank you
  • 0

#2 YellowAfterlife

YellowAfterlife

    GMC Member

  • Global Moderators
  • 3530 posts
  • Version:GM:Studio

Posted 28 May 2012 - 02:18 PM

global.holes = 0

with (obj_hole) {

    global.hole[global.holes] = id

    global.holes += 1

}

random_hole = global.hole[floor(random(global.holes))]

// do things with random_hole now

  • 0

#3 Sirosky

Sirosky

    GMC Member

  • GMC Member
  • 1332 posts
  • Version:GM8

Posted 29 May 2012 - 07:21 PM

I think this should be in the Question & Answer section. Posted Image
  • 0

#4 ChaosWormz

ChaosWormz

    GMC Member

  • GMC Member
  • 89 posts
  • Version:GM:Studio

Posted 30 May 2012 - 10:53 AM

Im creating a very easy to understand game. i have made objects that look like potholes and i want other objects to randomly replace them to make a "hit the hole" kind of game does anyone know what options i need or script. please explain how i can make an object to randomly replace one of the potholes. thank you


I don't quite understand your question. are you asking how to swap between objects/sprites?
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users