User Tag List

Results 1 to 7 of 7

Thread: Off-Screen Enemies

  1. #1
    No Products Registered

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

    Off-Screen Enemies

    I've been using Click products for a while, but I've never really figured out how to handle off-screen enemies in a smooth way. I've tried monster generators, and also the "Enemy Leaves the Frame" events, but neither seem to work.

    What is the accepted method of creating a system where enemies appear when you reach a certain point in a stage, and don't follow you forever if you run away, but instead respawn if you come back later? Thanks!

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Jul 2006
    Location
    Germany
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Off-Screen Enemies

    If you have multiple spawn points: store the fixed value of the spwan point in an alterable value of the created enemy. If you want to set him back to his "home", you can use this to find the right spawn point.

    Then you need to retrieve the distance between player and enemy. If the player is too far away, set him back home.

  3. #3
    No Products Registered

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

    Re: Off-Screen Enemies

    That works fantastically! Thanks!

    However, I'm still having problems with my other post, the Block Pushing one a few posts below this one.

  4. #4
    No Products Registered

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

    Re: Off-Screen Enemies

    Well, it working fine for a little bit...I don't really need the enemies to go back to their spawn point when they leave the area, just be destroyed. Currently I set up the events...

    WHILE:
    - Distance between Player and SpawnEnemy is < 500
    - SpawnEnemy's flag 0 is off
    DO:
    - Create enemy
    - Set SpawnEnemy's Flag 0 on

    WHILE:
    - Distance between Player and SpawnEnemy is >= 500
    DO:
    - Set SpawnEnemy's Flag 0 off

    However, this only works when there is one spawn point. If there are more than one, things start to get messy. If there are two onscreen at once, then they both spawn, but then never spawn again. And if there are two in the level but not onscreen at once, then neither of them ever spawn.

    What can I do to make this simply work? Thanks again.


  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Jul 2006
    Location
    Germany
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Off-Screen Enemies

    It could help to identify each spawn point more clearly. For example, spread value 1 in their alterable values.

    Loop for the number of SpawnEnemy times:
    If Alterable Value of SpawnEnemy=Loopindex (this picks one specific spawn point after another)
    + your other conditions

  6. #6
    No Products Registered

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

    Re: Off-Screen Enemies

    Sorry, but I'm having difficulty with the loops; I'm not familiar with them. Could you be more explicit in the events you recommend? I've added the

    - If Alterable Value of SpawnEnemy=Loopindex
    + Distance from Player to SpawnEnemy < 500
    + SpawnEnemy flag is off

    but I'm not sure where to start the loop or what else I need to do in order to complete it. Thank you for your time.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export Module

    Join Date
    Jun 2006
    Location
    Melbourne, Australia
    Posts
    765
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Off-Screen Enemies

    Basic principle of loops.

    http://www.clickwiki.info/index.php/Special_Conditions_Object#Fastloops_for_beginners

Similar Threads

  1. Running 640x960 (portrait) screen on 1366x768 PC screen
    By AyreGuitar in forum iOS Export Module Version 2.0
    Replies: 22
    Last Post: 11th April 2013, 02:39 PM
  2. How to do Enemies?
    By Corlen in forum Lacewing
    Replies: 4
    Last Post: 18th April 2012, 06:59 PM
  3. PMO for enemies
    By Warmachine in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 29th May 2011, 05:00 PM
  4. enemies
    By WareWolff in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th June 2010, 08:53 PM
  5. thrown enemies not detecting other enemies
    By mobichan in forum File Archive
    Replies: 4
    Last Post: 8th April 2009, 06:40 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
  •