Call an action or condition on a separate behavior.

0 favourites
  • 3 posts
From the Asset Store
Medeival & Viking War Horns Sounds / 22 Unique Calls / 2:40 minutes of audio
  • Okay... so I have this object and it already has physics behavior applied to it. I created my own behavior, but I need to access information in physics behavior. I should think I should be able to simply say something like this.behaviorInstanceIWant.someCondition ... but I can't find it in the sdk.

    In reality, I am basically writing controllers for physics objects. It seems like the sdk is usefull for making isolated behaviors but interactive ones seem much more difficult compared to other engines. Is this correct or am I missing something.

    Thanks

  • you're incorrect, behaviors have access to everything you'd need to write a controller. Calling specific conditions from the physics behavior is not how you'd go about it. you have to call the methods available to the instance / behaviour instance. if you wanted to write a behavior that runs events using conditions / actions / expressions, you're doing things wrong, you can do that in construct itself.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ...if you wanted to write a behavior that runs events using conditions / actions / expressions, you're doing things wrong, you can do that in construct itself.

    The reason I would do this is because a.) its still faster than the overhead of running c2 events, b.) I get sick of recreating events in project after project. I condense most of my events into behaviors and plugins because its easier to reuse them later than events are.

    On the other hand I am curious, I must have missed this post last year, other wise I would have responded sooner lol, but how would one access the methods of a behavior on another object from within the object whose behavior is running, clearly that is probably better than accessing the aces, but idk... half the time the aces are already configured in such a way that a behavior script isn't very usable outside of those...

    You would need the instance of the object being accessed, but im unclear as to how one actually calls the method on the behavior attached to that object?

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