User Tag List

Results 1 to 7 of 7

Thread: Making enemies that can shoot the player.

  1. #1
    No Products Registered

    Join Date
    Jul 2015
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Making enemies that can shoot the player.

    Hello everyone. This is not a thread that has not been done before, but I dont quite understand the answers given to the last one for I am an extremely new user to fusion 2.5 and was looking for some help. I have enemies that I would like to be able to see me, and fire at me. If you need more details on my situation please feel free to ask. Thanks in advance to anyone who takes the time to help me out. Even if you don't help thank you for stopping by. :)

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 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)
    Sparckman's Avatar
    Join Date
    Feb 2011
    Location
    Planet of the Kangaroos
    Posts
    1,396
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Here is an example, in this example fusion selects at random enemy and shoots an object to your character

    enemy_shoots_at_player.mfa


  3. #3
    No Products Registered

    Join Date
    Jul 2015
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, Looked at your example and was able to port it over to my game. I should have added this to my question but I guess I didnt have it on my mind at the time, how do I make it so that people dont shoot me if they cant see me? Like through an obstacle for instance. Thanks for your help though!

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    You may find various examples for "line of sight"
    digging deep in this thread:
    http://community.clickteam.com/threads/92924-Object-opacity-and-transparent

    good luck

  5. #5
    No Products Registered

    Join Date
    Jul 2015
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, thanks for the link, I checked it all out and I think I found the answer I found the little test game called BuiltInLoS and I played around with it, showing that it was just like said, simple but effective. The only problem I have is that I am not quite sure how to implement that into my current game. Being new to the entire program it is hard for me to put what somebody else had in to what I have, the last problem I had was simpler I think. If you cannot help me I completly understand because you dealt with basically the exact problem in another thread, and I will just do more hunting around the program and that thread to see if I can salvage any more information, but anything you might want to tell me would be greatly appreciated. Thanks for your time and have a great day!

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Yes, applying pre-cooked solutions to your own game can be distressful at first

    The solution I would suggest (from that thread) is this:
    http://community.clickteam.com/attachment.php?attachmentid=16989&d=1436522913

    Unfortunately the "builtinLos" method, while simpler and shorter to code, shows some buggy behaviour
    (its event logic appears to be flawless, maybe it has broken due to some bugs in latest versions of Fusion?),
    while the one above with overlapping line seems stable.

    Since I don't know exactly what's going on in your game, I would find difficult being more specific...
    you could try examining the code and finding out what you don't understand, ask here, so others may help and explain?

    If you're asking for a simpler "line of sight" method, so that you can practice,
    you could try by making your enemies shoot invisible "bullets" at maximum speed in multiple directions at any given time (i.e. every 1 second),
    when bullet hits player (meaning that the enemy has an open line of sight) make him shoot the "real" bullet towards the player.
    It's less precise but can be a start.

  7. #7
    No Products Registered

    Join Date
    Jul 2015
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, first make an active object, then make it so that every once it makes an object visible (which is what he shoots, projectiles let's say) and then make it so that it follows the object (the player)

Similar Threads

  1. How to make an enemy shoot directly at the player?
    By LemonyLime in forum The Games Factory 2 - Technical Support
    Replies: 18
    Last Post: 8th January 2017, 10:23 PM
  2. Help with making enemies chase the player
    By Gamemaker10 in forum The Games Factory 2 - Technical Support
    Replies: 8
    Last Post: 23rd September 2010, 08:00 PM
  3. making characters shoot?
    By wolf02 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 9th October 2008, 06:25 PM
  4. Making my Tank shoot
    By WLB423 in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 22nd July 2008, 02:55 PM
  5. Making enemies find player
    By LazyCoder in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 13th January 2007, 02:50 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
  •