[behavior] rex_LJpotential (attracting or rejecting objects)

0 favourites
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hey rexrainbow, im trying to use this to make my ufos chase the player but avoid the planets.. (ie go around them better). The thing is it seems I set the properties at Runtime on the planet (the planets are created at runtime) to:

    Source: Yes

    A: 0

    n: 0

    B: Planet.Width*2

    m: 1

    Sensitivity: 300

    Target: No

    But it seems it ignores my settings and go with the default ones assigned to initial object (in the layout).. am I doing something wrong there? Can I assign those properties at runtime?

    Thanks for your great work. You are definitely in the credits as a programmer on Cosmochoria haha

  • Yes, you could assign these parameters at runtime, there had a bug which already fixed.

    So you might check it again, or could you please provide a very simple capx to show this problem?

  • Hmmm i think once i started playing with teh ranges it worked a lot more to what i was after, i toyed with the sensitivity range on the ufo itself and that seems to have helped quite a bit. Thanks for this amazing plugin man, you made my UFO ai so much more sophisticated haha

  • rexrainbow - it seems theres a bug with LJPotential breaking the C2 "save game" feature. To reproduce bug:

    1) Add LJPotential to an object's behaviors

    2) Try to save the game (with a keyboard press or something)

    3) Gives an error.

    Here's a capx with the issue. Press "Enter" to save the game: http://d.pr/f/wH1K/2vV8bHeD

    Removing LJPotential from the objects behaviors causes the save game to operate normally.

    Is there any way to fix this? Thanks for your great work!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Update

    Fix bug when official saving.

    Thanks for finding this bug.

  • Amazingly fast, thank you so much for your incredible support.

  • Amazingly fast, thank you so much for your incredible support.

    You are welcome. It's my fault that missing this test case of saving.

  • Great addon as always

    Can you make this work with the official tilmap plugin?

    Or is there a way to make it work already?

  • This behavior would not change the position or angle of instance. So it could be applied to sprite or tilmap object.

  • rexrainbow

    Sorry, I'm not sure if i understand what you mean?

    I made a .capx that shows what i wan't to achieve.

    But I want to achieve the same thing without using the "EdgeBlocker" sprite.

    Because I fear that the EdgeBlocker sprites can have a performance hit when the levels get bigger.

    If this isn't possible without using the EdgeBlocker sprite I'll do it with them.

    btw it's super fun to play around with this addon

  • I got it. You want to treat tilemap as multiple sprites for all tiles in a tilemap object.

    It might be possible, I would try.

    Edit:

    Sorry, I thought it might be better to place "edge block" sprites.

  • AI of Race car v2

    It seems that using attracting only and put them carefully could help race car moving smoothly. Some attracting point does not put well in this demo.

    Add rejecting might be more smoothly I thought.

    that is so sick....

  • rexrainbow

    Thanks for trying , i'll go with the sprites then.

    When i disable collision and visibility of the sprites it shouldn't be too bad.

  • Performance in mass of instances is another problem.

    I try to solve it by this plugin which destroy instances outside of masked area, to reduce the amount of instances.

  • rexrainbow

    1. can this be used for create boids (flocking)?

    2. can it be used with pathfinding?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)