User Tag List

Results 1 to 4 of 4

Thread: Using Sin for wave movements?

  1. #1
    No Products Registered

    Join Date
    May 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using Sin for wave movements?

    Hi,

    I would like to integrate a wave-like movement for an enemy for shmup game. Similiar to the first enemies in R-Type. (Video Example)

    I guess it would be best handled by using sin. But I have never used it before and have no idea how to set it up. So I wanted to ask for some basic explanation how to influence movements with sinus.

    I tried this. Just to test how a sin value would influence the movement.

    IF
    Y pos of (enemy) <=50
    THEN
    Set X pos to X(enemy)+Sin(0.4)

    But nothing at all happened. :p



    So it would be really helpful, if someone would give me a basic explanation, about how to integrate sinus as a value for such a movement.

    Thanks in advance.

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Using Sin for wave movements?

    Change your X code to
    Set X pos to X("Enemy")+5*sin(Y("Enemy"))

    where 5 is the amplitude of the wave.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jun 2006
    Location
    Norway
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Using Sin for wave movements?

    Here's an example
    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=239278#Post2392 78

    Just don't use the one labeled "CRASH".

  4. #4
    No Products Registered

    Join Date
    May 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Using Sin for wave movements?

    Thanks for the replies.

    I now understand how it works and it is a lot of fun, playing around with it.

Similar Threads

  1. wave of bees...
    By UserIsSean in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st July 2009, 08:16 PM
  2. Wave problems
    By Kochicoro in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 15th January 2007, 10:04 PM
  3. Sin wave
    By Horn in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 6th December 2006, 06:38 AM
  4. Wave Effect
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 10th August 2006, 01:20 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
  •