Ashley's Recent Forum Activity

  • This is a bug in the function object. The way triggers work is triggering "On function" with fn_name = F1 triggers both "On function F1" and "On function F2", with the intent that only "On function F1" returns true. In "On function F1", which is first in the event sheet, "Call F2" sets fn_name = F2 and again Construct 2 triggers both "On function F1" and "On function F2", and this time only "On function F2" returns true. However the value of fn_name has been overwritten, and now execution returns up the stack and Construct 2 is still triggering all "On function" events for the original "Call F1" action. Since fn_name was overwritten to F2 in the nested function call, it should trigger "On function F2" with fn_name = F1, but it's now F2 which returns true and incorrectly runs the event.

    Relevant part of the plugin:

         FunctionKlassProto["_CallC2Event"] = function(name)
         {
            this["fn_name"] = name; // *** overwrites a single value
             this["plugin"].runtime.trigger(cr.plugins_.Rex_Function.prototype.cnds.OnFunctionCalled, this["plugin"]);
         }; 

    Instead you need a stack of state like the event system uses: you need to push the function name to a stack, trigger, then pop the function name from the stack. In 'OnFunctionCalled', only compare to the name at the top of the stack.

  • Can you reproduce this in a new project?

  • Please see how to report bugs. We really need a repro .capx made from scratch for issues like this. Otherwise it could just be an issue in your events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The preview and export should look the same, yeah, but it's probably the fact non-fullscreen preview mode centers the canvas in the (non-scrollable) window for more convenient testing, and this is ideal for games and no game would ever have a non-fullscreen canvas bigger than the window. Can't you work around it by using a temporary smaller canvas during testing?

  • I'm not sure this is a situation we can support - the canvas is not designed to be bigger than the window, and if you use a fullscreen-in-browser setting there's no good way to integrate with the browser scrollbar. To be honest Construct 2 is designed as a game creator and not a website creator, so I don't want to get involved in adding features to design websites. You should be aware of severe shortcomings from designing websites like this: it's often inaccessible, will not be viewable on old browsers, it's unsearchable, untranslatable, does not integrate with browser forward/back, has no URLs to specific pages, cannot copy/paste text out the page, Google cannot index it so you'll get a rock bottom pagerank, etc. etc. Many of these issues cannot be fixed at all. Because of this I don't recommend making websites in Construct 2 and we probably won't fix any issues that crop up in trying to make websites. I highly recommend going back to HTML!

  • Go2Holidays - I think I've managed to fix audio in PhoneGap for the next build. Note that android_asset is specific to Android so it will break iOS, I've added an Android-specific check in my version. Also the Audio object has a pretty complicated caching/audio recycling engine which your code does not take in to account, I'd recommend waiting for the next build where it should work!

  • Do you have any preload on start of layout though? It might accidentally be playing preloaded sounds.

  • Try creating the object in the middle of the circle, then using the 'Move at angle' action to move it a distance at random(360) degrees.

  • Apple prevent HTML5 games playing audio without user input, apparently to prevent web pages wasting cell bandwidth. Try publishing via appMobi to get sound working better.

  • Heh, the Platform behavior is actually getting really complicated. It has to support any angle of gravity which means jumping on to jump-thrus from underneath, when underneath can be any angle... but I think I got it fixed for the next build! *hopes*

  • You should not use the Platform behavior for stacking falling objects, it's designed for jump-and-run player control. Maybe give the Physics behavior a shot?

  • I can't seem to download/open the link. (Try setting your server's MIME type for .capx to application/octet-stream) Why do you want a canvas size bigger than the window though?

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,831,032 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x6
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,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
  • x44
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs