Generating random actors at one specific location

homatich@gmail.comhomatich@gmail.com Member Posts: 1
edited March 2014 in Working with GS (Mac)
Hello, I'm new to making games and know next to nothing about it. But I'm interested in learning.
So basically what I'm trying to do is when you press on a actor, a new one ( or a the same one) will appear at the same place.

Just to give an idea of what type of game I'm trying to make: it's a mathematical game where for example if 21 appears at the top you need to press 3 and 7 or vice versa in the grill below. If there is no numbers that appears that could multiply to 21 you need to not press anything.

At the top there is a randomly generated number that appears and below there is 9 squares with randomly generated number that appears in each square. As simple as that type of game is to play, there is a quite the complexity of making it and I think I'll learn a lot from it.

Comments

  • ArmellineArmelline Member, PRO Posts: 5,458
    Can you clarify why you want to spawn an actor in the same place?

    Doing that just requires a Spawn Actor behaviour with no offsets set. But I'm not clear from your description why you'd want to be doing that. Perhaps to highlight the numbers chosen?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You wouldn't spawn a new actor, you would just change the image. If you name your images carefully (e.g. "1.png", "2.png", etc.) then you can do change attribute self.Image to random(1,9) and the image will change to the new number.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Or just change an integer attribute, shown via a Display Text behaviour in the one actor.
  • homatich@gmail.comhomatich@gmail.com Member Posts: 1
    thank you guys, that's exactly what I needed
Sign In or Register to comment.