User Tag List

Results 1 to 7 of 7

Thread: How do I make random movements?

  1. #1
    No Products Registered

    Join Date
    Oct 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I make random movements?

    Hello I'm back!
    Alley cat remake is 80% completed ( I have to add music, sounds...and 1 important thing "random movements" or it will be boring)

    Example:

    In the bonus level (with arrows and hearts) to make arrows animation I did:

    *Every 1 second ->create arrow1 at X34,Y22 and start its animation
    *Every 4 seconds ->create arrow2 at X98,Y22 and start its animation
    *Every 3 seconds ->create arrow3 at X162,Y22 and start its animation

    Ok this is boring.

    I need something like this:

    When the screen starts arrows have to start in random sequence (or maybe after 2 seconds the screen starts)
    And if arrow1 starts it has to let the screen before another arrow 1 starts in a random sequence.

    Can you help me?

    Thanks!

    [size:8pt]Thread title modified to remove the overuse of upper case[/size]

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Location
    Westcountry, UK
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HOW TO MAKE RANDOM MOVEMENTS?

    [obj_active] = archer
    [events]
    *Start of frame
    -[obj_active] Spread "0" in Alterable Value A
    -[obj_active] Set Alterable Value B to direction of [obj_active]
    *Number of "Arrows" = 0
    -[obj_special] Set Global Value Z to random(number of archers)
    *Number of "Arrows" = 0
    +[obj_active]Alterable Value A = Global Value Z
    -Create "Arrow" at -32,-32
    -Set X of "Arrow" to X of [obj_active]
    -Set Y of "Arrow" to Y of [obj_active]
    -Set rotation of "Arrow" to Alterable Value B of [obj_active]
    [/events]

  3. #3
    No Products Registered

    Join Date
    Oct 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HOW TO MAKE RANDOM MOVEMENTS?

    A simplest way?

    Example:

    At random times object starts

    Is it possible?

  4. #4
    No Products Registered

    Join Date
    Aug 2006
    Location
    Westcountry, UK
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HOW TO MAKE RANDOM MOVEMENTS?

    The example above will create an arrow at one of the archers facing the right direction after the last arrow has been destroyed.

  5. #5
    No Products Registered

    Join Date
    Nov 2006
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make random movements?

    How about:

    [obj_thetimer]Every 1 second
    - Add Random(10) to Counter


    Counter >= 10
    Pick one of [obj_active] at random
    - [obj_active]Start
    - Set Counter to 0


    The [obj_active] is the arrow in this example. And, you can, of course, adjust the different things such as how many seconds till the counter is raised, how much it is raised, and how high the counter must be until the other stuff happens. Also, how do you do the Event List View thing on here?

  6. #6
    No Products Registered

    Join Date
    Aug 2006
    Location
    Westcountry, UK
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HOW TO MAKE RANDOM MOVEMENTS?

    You left out creating the arrows & setting thier position. I'm not quite sure whether the archers reload - if not, you're example is fine.

    Also this would fire an arrow upto 100 seconds apart which is far too long so Counter >= 10


  7. #7
    No Products Registered

    Join Date
    Nov 2006
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make random movements?

    Okay. I don't really know what he's using it for, so I just did what I thought might be good. I've never played the alley cat game or whatever it's called.

Similar Threads

  1. How to make a random spawner?
    By UnicornMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 20th December 2013, 04:13 AM
  2. Make Random Pool not-so-random?
    By UltraHammer in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 4th April 2013, 02:53 PM
  3. Selecting random movements within a behaviour
    By psq4 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th December 2012, 02:58 PM
  4. How to make path movements without path movement?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 25th February 2012, 06:49 PM
  5. How do I make enemy movements like AI?
    By Scooter in forum The Games Factory 2 - Technical Support
    Replies: 11
    Last Post: 28th November 2007, 07:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •