User Tag List

Results 1 to 6 of 6

Thread: Object moving into other objects position

  1. #1
    No Products Registered

    Join Date
    Apr 2016
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Object moving into other objects position

    Hello,
    I'm pretty new to clickteam and scirpting overall.
    I wanted to make one object shoot other object to player position value (not current value, the place where he was standing when object was launched) so the object could then leave toxic splash at that place or something.
    I cannot qute find how to do this at my own, and i cannot find solutions either.
    Thanks

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    PlasmaVoid's Avatar
    Join Date
    Jan 2015
    Location
    SoCal
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How accurate do you want your movement to be? Using built in 32 direction movement will be significantly easier, building a custom movement from scratch will be harder but will have tons more freedom and customization, and will be better to learn overall.

    Easy Method:
    -----
    In the event editor, create the following conditions:
    New Condition -> Shoot Condition(whatever you would like the event that causes the object to shoot to be)->
    -Your shooting object > Launch An Object > Towards active object > Select the object you would like to shoot at
    Thats it, should work fine
    -----

    Custom Movement Method:
    -----
    This will require a few prerequisites. Create the variables "X Pos" "Y Pos" "X Speed" "Y Speed" and "Move Speed" in the global variables page, or create them as alterable values in your projectile objects "variables" page.
    New Condition -> Your Shooting Condition->
    -Create Object "Projectile" At Shooter Objects Position
    -Set X Pos(Projectile Value) to X Position(Projectile)
    -Set Y Pos(Projectile Value) to Y Position(Projectile)
    -Set X Speed(Projectile Value) to (Sin(Vector from Projectile to Target X, Target Y, + 90) ) * Move Speed(Projectile Value)
    -Set Y Speed(Projectile Value) to (Cos(Vector from Projectile to Target X, Target Y, +90) ) * Move Speed(Projectile Value)
    New Condition -> Always ->
    -Add X Speed(Projectile Value) to X Pos(Projectile Value)
    -Add Y Speed(Projectile Value) to Y Pos(Projectile Value)
    -Set X Position(Projectile) to X Pos(Projectile Value)
    -Set Y Position(Projectile) to Y Pos(Projectile Value)
    -----
    That should work. Let me know if you have any more questions

  3. #3
    No Products Registered

    Join Date
    Apr 2016
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice answer, thank you.
    But i need different thing. The normal object launching makes that the object flies in straight line towards for example player. Without any additional conditions it will just fly past him and then continue its journey around the world.
    However i need that the launched object will be shot towards the player position(X,Y position at that moment, player can then move into different spot but the projectile will land in his old position)
    Just to clear things up:
    Imagine player running circles around the enemy. Enemy then prepares his devastating attack and spits boll of acid into player. Although player is long gone and now is on the other side of the boss, ball of acid will still leave poison pool on that old player position, making boss area harder for player to move around it.
    I hope you get what i mean, im looking towards your next answer. Thank you!

  4. #4
    Clicker Fusion 2.5Android Export Module

    Join Date
    Sep 2010
    Posts
    531
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Maybe create an invisible object at the player character every 3 seconds or whatever? Then have the enemy shoot at that instead and when the projectile touches that invisible object you destroy it

  5. #5
    No Products Registered

    Join Date
    Apr 2016
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is pretty clever idea, thanks!

  6. #6
    Clicker Fusion 2.5Android Export Module

    Join Date
    Sep 2010
    Posts
    531
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    No problem! Hope you get it working :-)

Similar Threads

  1. Replies: 0
    Last Post: 15th June 2016, 02:00 PM
  2. Moving sprites with position values
    By soopytwist in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 21st June 2015, 12:04 AM
  3. Move object to moving touch position?
    By gagegage926 in forum Fusion 2.5
    Replies: 3
    Last Post: 14th March 2015, 01:48 AM
  4. Bouncing Ball Object stops after moving position?
    By Remixful in forum Fusion 2.5
    Replies: 1
    Last Post: 28th December 2014, 12:04 AM
  5. Replies: 7
    Last Post: 19th July 2014, 01:42 PM

Tags for this Thread

Posting Permissions

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