GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Jiggle X ORBZAMPLE

ORBZORBZ Posts: 1,303Member, PRO
edited 4:00AM in Introductions
Random x movement without complicated rules, etc.

This little guy is moving without any user input.

Enjoy :)

http://gamesalad.com/game/play/79713

Comments

  • beefy_clyrobeefy_clyro Posts: 5,390Member
    I look forward to getting on my mac so i can take a look at this, i have a game im starting to work on where i'll make good use of this. Thanks
  • beefy_clyrobeefy_clyro Posts: 5,390Member
    Just wondering, could some Y movement be added into this as well?
  • ORBZORBZ Posts: 1,303Member, PRO
    Yes, very ez. One line. I kept Y axis out to simplify the demo.
  • jstrahanjstrahan Posts: 498Member
    Love it got ideas already coming
  • beefy_clyrobeefy_clyro Posts: 5,390Member
    Sweet. I would want the Y random moving like the X, i take that it would be the same but replacing the X's with Y's?
  • ORBZORBZ Posts: 1,303Member, PRO
    yes
  • FanStudioUKFanStudioUK Posts: 459Member
    this is a great example!

    I'm trying to use it in my game, every 3 seconds to spawn an actor at self.position.x and self.position.y but it's not working....

    it's not spawning anything.

    any idea why ?

    thank you
  • FanStudioUKFanStudioUK Posts: 459Member
    I did manage to make it spawn actors but it doesn't read the random position.x of the cube's movement.... this is strange!
  • ChaserChaser Posts: 1,453Member
    Im not at computer to see file but I did the same thing with 1 actor and 2 timers
    1 says every 3 seconds change velocity speed 60 to 0 degrees and the other timer every 4 seconds do the same thing at 180 degrees. Looks random and sometimes goes more left and others goes more right
  • FanStudioUKFanStudioUK Posts: 459Member
    why it doesn't constrain the position.x to the movement?
  • FanStudioUKFanStudioUK Posts: 459Member
    did anyone tried this?
  • ORBZORBZ Posts: 1,303Member, PRO
    @andreib

    Make a sample project illustrating your problem so I can see what you're talking about. I don't understand the problem you are having.
  • FanStudioUKFanStudioUK Posts: 459Member
    I opened your template and inside the Spaz I put the follwing action:

    Timer: every 2.5 seconds to spawn a parachute (having the Spaz's self.position.x) that is moving down slowly...

    The Spaz is spawning the parachutes but only in the middle of the screen and I don't understand why is not spawning them at the random position.x of the Spaz.

    Any idea why ?
  • FanStudioUKFanStudioUK Posts: 459Member
    Ohh, I got it! FINALY!

    In the parachute actor I was using Interpolate with self.position.x also that was why it was spawning it from the same spot :D

    Sorry for the trouble Orbz, your templates are so inspiring!!!
  • ORBZORBZ Posts: 1,303Member, PRO
    I think i understand what you are doing.

    Try this:

    In your parachute actor, remove all behaviors and rules. Then just set the motion.linearVelocity.y = -30

    The in the spaz actor just spawn the parachute at location 0,0 relative to actor.

    That should do what you want without needing to interpolate the parachute down the screen.
  • FanStudioUKFanStudioUK Posts: 459Member
    The problem was that the parachute has a pendulum movement

    Constrain: Self.Position.X to 20*cos( self.Time *100%360)+240

    That's why it's not working as I want...
  • ORBZORBZ Posts: 1,303Member, PRO
    Ahh, gotchya. Well in that case keep the constraint on the x movement but also set the motion.linearvelocity.y to -30. That way you don't have to interpolate y.

    Of course, if you WANT to interpolate y, you can. It doesn't hurt.
  • FanStudioUKFanStudioUK Posts: 459Member
    I don't think I get it...but I can only spawn the parachutes at the Spaz random position only if I remove the pendulum movement...
  • FanStudioUKFanStudioUK Posts: 459Member
    I forgot to mention, for the Spaz I'm only using the motion.linearVelocity.X - I'm interested only in the X random position
  • ORBZORBZ Posts: 1,303Member, PRO
    If you want you can send me your project and I'll take a look at it.

    s o u l a t o r b z d o t c o m
This discussion has been closed.