piranha305's Recent Forum Activity

  • I have actually made a few "games" with GM (sadly lost to the sands of time) and while I don´t think it´s terrible, when I tried C2 it just instantly clicked with me in a way GM never managed to. The rest is history.

    I don´t think GM is terrible, just not for me.

    I agree, i have used GameMaker Studio 1/2 in the past, I think construct does alot of thing better (GUI,Instance Management, Visual Programming, Engine Updates ....). and things are more intuitive, and it's super fast to add feature/prototype your game. and with the hard work Scirra is doing adding new features/ bug fixes as quick as they do... It's just a matter of time before one of the many talented people using construct make a hit game, and give the engine recognition.

  • you are 100% correct, it was much easier to handle this logic outside the event sheet. by adding the instances to data structure outside the runtime, and assigning the trigger as a callback when a new event it emitted, i can skip using call action, and just get to the trigger directly for the specific instance.

  • Well i was never planning on releasing this addon, i am using it internal in my project, but i see your point in trying to hack that in the framework.

    but now as a counterpoint for more extensible addon. there should be a clean way of publishing a message, and having a set of instance be able to subscribe to that message type, and trigger some type of functionality. without having to couple the instances to the messaging system. it would also improve event sheet maintenance if your are designing your event sheets in a modular way, you might not want to mix concerns.

    a common example is pausing your game? that is a cross cutting concern across all your event sheets? you have to disable some button collision, reduce the time scale, hide/show new elements, these things might be implemented in different events and you might not want to mix that logic. can we just emit a message (in this case a string) "pause" / "unpause" and fire off a trigger to all the instances/system that are subscribed to those events?

    i guess there are multiple ways to handle the situation, i am just trying to apply different concepts to implementation, which might not fit so well, writing this you could solve that issue by having a separate event sheet dedicated to your cross cutting concern, and that event sheet will be aware of all the instances

    i was just dreaming of a more flexible approach, where i can just attach a behavior to the object and set the message to listen and have it all happen auto-magically so i would not have to duplicate those events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • endel you should check piranha305.itch.io/c3ide it helps streamline plugin development, and has an integrated web server.

  • okay i figure it out, the instance i was getting was not the type i was expecting. so this code achieves what i was trying to do

     	var behavior = this._inst.GetBehaviorInstanceFromCtor(C3.Behaviors.Piranha305_PubSub);
    	var instances = behavior.GetBehavior().GetInstances();
    	
    	for(let instance of instances){
    		var behav = instance.GetBehaviorInstanceFromCtor(C3.Behaviors.Piranha305_PubSub);
    		var sdkInstance = behav.GetSdkInstance();
    		sdkInstance.CallAction(C3.Behaviors.Piranha305_PubSub.Acts.SimulateMessage, channel, msg);
    	}
    

    this works good if the instance only has only one instance of the behavior attached.

    would it be possible to add instance.GetBehaviorInstanceFromCtor(C3.Behaviors.Piranha305_PubSub);

    but have it return an array of behavior instances instead of just the first instance?

  • Ashley

    Is there currently a way to invoke Actions/Triggers on a separate behavior? for example Lets say i have 2 instances A, and B, and they both have my same custom behavior.

    in the event sheet i call A.Execute Action

    I want that action to execute a trigger on all Object Types/Instance that have the behavior?

    var bInstances = this._inst.GetBehaviorInstances();
     for (let behavior of bInstances)
     {
     var behaviorType = behavior.GetBehaviorType();
     if (behaviorType.GetName() == "PubSub")
     {
     var sdkInstance = behavior.GetSdkInstance();
     sdkInstance.CallAction(C3.Behaviors.Piranha305_PubSub.Acts.SimulateMessage, channel, msg);
     }
     }
    

    So the intention of the code above is, when this action is called, it's going to iterate over all instance(of any object type) that has this behavior attached and invoke an action on that behavior, which fires off a trigger

    What i am noticing is this._inst.GetBehaviorInstances(); only returns the instances of the same type? is there a better "documented way" to get all instances which share the same behavior?

  • Ashley okay maybe what I am missing is that nothing is in fact downloaded into my browser's cache?

    that the website doesn't check which version I used last? I assumed it did.

    if it did, I would want it to load that one and only prompt me if there was a newer one avail.

    is this possible?

    I think the versions are cached in your browser, if you open up chrome dev tools and look at the application cache you can see all the version you ever opened there

  • this is incredibly confusing...

    editor.construct.net - loads the latest stable (regardless of the one you have installed)

    editor.construct.net/beta - loads the latest beta (regardless of the one you have installed)

    what link loads the version I already am working with? that I already have downloaded??

    you can pass the version as the url segment

    editor.construct.net/r132 and it should load that version, the thing is you will always get that popup to update to latest version. stable or beta if you go back far enough, maybe there should be a setting to suppress those notifications, if you want to keep working on the same version and you naviagte using to the exact version.

  • So what i have been doing is using the browsers plugin close action. the thing is after i close the game if i restart the game a Software update needed Android system web view message shows up?

    So opening the app for the first time works properly, i use the browser close action (on android device) then i reopen the app and get the update needed.

    is there a different way to provide a close application on android??

    I was testing this on a Galaxy Note 9.

  • With BBC codes i can get a outline around my text? is there a way to control the size of the stroke for the outline?

  • You can use the new ray cast feature, and the drawing canvas https://drive.google.com/open?id=1INQmMBraaUiCh89bSJqlurLjBZSeEGzW

  • https://drive.google.com/open?id=1ruI5QoME0XlcYOdcEg4RBj4j1PWx0DDi

    I created a GIF of a simple basic example. hopefully it helps

piranha305's avatar

piranha305

Early Adopter

Member since 26 Apr, 2016

Twitter
piranha305 has 37 followers

Connect with piranha305

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • x12
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x13
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x4
    Lightning Draw First person to up-vote a new Construct 3 release
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

20/44
How to earn trophies