Researched. But still need help.

CaptFinnCaptFinn Member Posts: 1,828
edited November -1 in Working with GS (Mac)
Ive looked over the spawning temps in GS. But I still can seem to get this to work right.

Here is a example image.

I want Actor1 to spawn from off screen and travel in a str8 line to the center of the screen. I want the actor to do this but do it multiple times from multiple positions off screen. If i can fiqure out how to make Actor 1 do this then I can rinse and repeat Actors 2-3 and change a few of their spawn times and travel speeds. But I cant get Actor 1 to do this.

Image and video hosting by TinyPic

Comments

  • gazjmgazjm Member Posts: 578
    use interpolate to move the actor to the centre coordinates, to place randomly set an attribute called self.location

    When object reaches centre of screen set self.location to be random(1,4)

    If self.location = 1
    self.x = -50
    self.y = random(-50,370)

    If self.location = 2
    self.x = 530
    self.y = random(-50,370)

    If self.location = 3
    self.x = random(-50,530)
    self.y = -50

    If self.location = 4
    self.x = random(-50,530)
    self.y = 370

    That will move the item to a random place around the edge of the screen.
  • CaptFinnCaptFinn Member Posts: 1,828
    But I will want it to spawn randomly and frequently. Come in from top and 2 secs later another one come in from side and 4 secs later another one from bottom. I guess best way to imagine it would be to imagine a black whole sucking in debris from off the screen. you never know where or when or how many at a time will pop up on the screen and head to the center of the black hole.
  • gazjmgazjm Member Posts: 578
    I think you'll need to use timers and and set the interpolate start to a random(time), it's just gonna take playing with, but to get around the edge of the screen, I used the above code in an old project. you will just need to replace the numbers to be relative to the screen size.
  • LBGLBG Member Posts: 277
    gazjm said:
    I think you'll need to use timers and and set the interpolate start to a random(time), it's just gonna take playing with, but to get around the edge of the screen, I used the above code in an old project. you will just need to replace the numbers to be relative to the screen size.

    Random time doesn't work. I have tried over and over to make it work but no cigar.
  • gazjmgazjm Member Posts: 578
    it does if its only used once.

    In this situation, when the actor is at the centre if will move to the outside and then run a timer rule.

    Because it re-runs the rule every time it changes to the outside, it will change the value of random time each time.

    If you want multiple items to spawn at random times from one actor and have that actor with a rule saying random(time), then that will only generate it once.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    http://dl.dropbox.com/u/5068448/test.zip

    each actor has it's own attributes for interval, and side. interval is how often it comes in, side is which side the actor is on.

    i tried to upload a video, but iMovie is insisting on scanning my aperture library.

    edit: here it is:

Sign In or Register to comment.