dop2000's Recent Forum Activity

  • Oh, so you want to send for example, "Object15, Object57, Object58, Object60...", and you want to increase counters for these objects in the table?

    I don't know how to lookup data in the table, but if all these 200 objects are in rows 1 through 200, you can send row numbers as url parameters:

    https://script.google.com/macros/s/...../exec?obj1=15&obj2=57&obj3=58&obj4=60...
    

    In the script you loop through 10 parameters, extract row numbers and increment the counters:

    var nextRow = 0;
     
    for (var i = 1; i <= 10; i++) {
     nextRow = Number(e.parameter["obj"+i]);
     sheet.getRange(nextRow, 2).setValue(Number(sheet.getSheetValues(nextRow, 2, 1, 1))+1);
    }
    
    
    
  • I think you should change it like this:

    sheet.getRange(nextRow, 1).setValue(e.parameter["number1"]+1);
    sheet.getRange(nextRow, 2).setValue(e.parameter["number2"]+1);
    sheet.getRange(nextRow, 3).setValue(e.parameter["number3"]+1);
    sheet.getRange(nextRow, 4).setValue(e.parameter["number4"]+1);
    and so on
    

    If this doesn't work, remove all "+1", and add 1 to variables in Construct event before sending the data.

  • With Local Storage each key is loaded in a separate thread, so you need to wait for both keys to load before you can compare them. So you can do something like this:

    It's easier to store multiple values in a single dictionary. See this demo:

    dropbox.com/s/1cz1k5x3teikbv5/DictionaryLocalStorage.capx

  • Here is an example:

  • The easiest way to do this is with MoveTo behavior:

    construct.net/en/forum/extending-construct-2/addons-29/behavior-moveto-40701

  • The best way to deal with this is to add Player and PlayerMask into a container. And same with the Enemy and EnemyMask.

    This way when you create an EnemyMask instance, its own Enemy instance will be created automatically. And they will be logically linked. So, for example, if you pick Enemy in an event, its EnemyMask will be picked as well. Read about containers, they can really help here.

    Also, it's not recommended mixing Physics with Platform or any other non-physics behavior. And I don't know much about Spriter, but I'm guessing it's not very compatible with physics either.

  • What do you mean by "collided monster"? Inside this event you picked an instance of Monster family which has collided with the weapon. So I guess what you need to do is subtract 1 from MonsterHealth, or something like that. Only the instance which collided with the weapon will be affected.

  • random(2) is a number from 0 to 1.99999999999

    random(1,3) is a number from 1 to 2.9999999999

    So yes, floor(random(1,3)) is the same as choose(1,2), and represents 50-50 chance.

  • Here is what I would probably do:

    dropbox.com/s/56j5rby2vg591lj/MouseAndTouchToFunctions.c3p

    You add all clickable/touchable objects to families. And replace all "On touched", "On object clicked" etc. events with functions. Map these functions, so you could call them by name. (this may be easier to do with the old Function plugin)

    Of course, this is a very basic example. You can add more things, for example create two global variables MouseTouchX and MouseTouchY. Add an event at the top of your event sheet which will set these variables to either touch or mouse x|y coordinates, whichever is active. And in all other events use these variables.

  • Run the game in debug mode (Ctrl-F4) and see how much memory and CPU it uses and what changes when it becomes slow. If you click "Profile" tab, you will be able to see most CPU-consuming events.

  • Set physics world gravity to 0. Also, it may be much easier to use Bullet behavior instead of Physics, just set "Bounce of solids=Yes".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It shouldn't be a lot of work. Use the invisible sprite for movement and everything collision-related (collision with walls, bullets, enemies etc.) Use Character sprite for animation changes and everything else. Pin character to the invisible sprite at start of layout.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 260 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • 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
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies