User Tag List

Results 1 to 2 of 2

Thread: Enemy sequence

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Mar 2009
    Location
    Australia
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Enemy sequence

    Hi, I've created a grid movement for some enemies in my game and i was wondering if there is some way that i could make each enemy read a sequence of Letters say "RRLLRL" and get them to move according to it. I suppose it would be sort of like giving them a dance routine where "R" represents move right and "L" move left and once they have performed one step they read the next one and so on.
    If you can think of another way of telling an enemy to perform a defined routine similarly then that would also be very helpfull.

    any assistance would be appreciated
    thanks

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Enemy sequence

    I haven't done this myself, but you could store the routine in an alterable string and then test if it contains a routine. If it does, do the first step and remove it from the routine. The enemy should only test for a routine if it is not currently performing a step.

    Something like this:

    * Enemy: Flag 0 is Off [color:#CC6600]// Enemy is not moving[/color]
    + Enemy: Alterable String A <> "" [color:#CC6600] // The enemy currently has a routine[/color]
    - Start loop/function Left$(Alterable String A( "Enemy" ), 1) 1 time [color:#CC6600]// Calls the next Routine[/color]
    - Enemy: Set Alterable String A to Right$(Alterable String A( "Enemy" ), Len(Alterable String A( "Enemy" )-1)) [color:#FF6600]// Remove the step from the routine[/color]
    - Enemy id counter: Set value to fixed value of Enemy [color:#CC6600]// So the function knows which enemy to move[/color]
    - Enemy: Set flag 0 On [color:#CC6600]// Set enemy to moving[/color]

    * On loop "L"
    + Enemy: Fixed value = Enemy id counter [color:#CC6600]// This is the correct enemy[/color]
    - Start Movement L

    * On loop "R"
    + Enemy: Fixed value = Enemy id counter [color:#CC6600]// This is the correct enemy[/color]
    - Start Movement R

    * Movement L is Done
    OR
    * Movement R is Done
    - Enemy: Set flag 0 Off [color:#CC6600]// The enemy is not moving anymore[/color]

    I didn't test this so beware of mistakes.

Similar Threads

  1. Problème de sequence. help
    By Tessier in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 4th January 2012, 11:04 PM
  2. arrêt séquence
    By orozko in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th July 2011, 01:06 PM
  3. Help with having a sequence of actions
    By Dochii in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th July 2009, 12:10 PM
  4. Changing animation sequence
    By Rabagast in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 28th April 2008, 07:29 AM
  5. Animation sequence selection bug?
    By Clicktastic in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 8th September 2006, 06:11 PM

Posting Permissions

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