Digitalsa's Recent Forum Activity

  • A method I am using in my games that allows embed code like the above to be pasted, is Pode's HTML iFrame plugin you can find here: viewtopic.php?f=153&t=69356 — there is a handy little guide here that explains what to do after you've downloaded the plugin: https://www.scirra.com/tutorials/740/ho ... ur-appgame

  • Just taking R0J0s code I get :-

    https://www.dropbox.com/s/j2js9jokjs5sn ... e5d4m.capx

    If this is what you want and if you were serious about a small sum of money then please place this small sum into a children charity box.

    Thanks for the link mate. Will check that out shortly. And yes, I was serious about the cash and I completely agree with donating it to a children's charity, I will do just that. There is one fantastic community here!

  • Sadly replicating the above code was a difficult experience for me. Would it be possible to get a little help with this? I would be happy to pay a small sum of money for the right solution. I want to learn, a simple bounce that touches each side without doing weird things like bouncing side to side or up and down. It seems like it shouldn't be that difficult, but it is and after countless searching it seems that this is an issue many have struggled with.

    Just let me know what you need and I'll supply it. I can talk over Skype if that helps.

  • Digitalsa

    Why not do it just like your code?

    You have this:

    if (x + dx > WIDTH || x + dx < 0)
        dx = -dx;
      if (y + dy > HEIGHT || y + dy < 0)
        dy = -dy;
    
      x += dx;
      y += dy;

    Which is all doable with events.

    This tutorial may be of help to get you up to speed: scirra.com/tutorials/37/beginners-guide-to-construct-2

    I feel so silly, but you're right. After giving it a little more thought, the code in the JSFiddle I posted isn't all that difficult in Construct 2 using events. I'll let everyone know how I go. I'll give it a shot converting over my fiddle code to C2.

    Thank you for your help. I think the long stressful week just fried the logic part of my brain.

  • You asked, so you get:

    * Rabid dogs that fire bees at you when they bark at you

    * Ninjas that rope down from the ceiling with boxcutters in hand

    * One of the big bosses could be Lance Armstrong trying to jab you with a steroid needle

    * As for gameplay mechanic, have you played Fez before? You could be inside of the house and as you progress through you get this pseudo 2D/3D level spin effect: en.wikipedia.org/wiki/Fez_(video_game)

    My brain is fried at the moment, there you go though. Please put Lance Armstrong in there.

  • Add Solid behaviour to your wall spite - make four and place at each side. Give ball sprite Bullet with 'Bounce off solids' behaviour. Set a starting angle (let's say 40) - done.

    I essentially tried the same thing, but the bounce doesn't consistently hit each wall. The bounce either becomes too predictable (pattern never changes) or it doesn't do the sine effect I am after where the ball should hit each wall once, just a different spot each time.

    As you can see in my posted JSFiddle, the ball consistently touches each side. With the bounce behaviour and movement set to bullet, the ball could bounce up and down, side to side, corner to corner, but not achieve the sine bounce I am after.

    I want there to be somewhat of a pattern in movement, but hit a different point each time. This will allow users of the game to use tactics because the movement will be the same touch each side of the wall once movement, but it will slightly randomise the path roughly every 5 seconds or so.

  • I am quite new to C2 myself, but I am currently making a simplistic game that uses a timer as a score.

    The way you would do it however is using a variable:

    Define a variable and call it Score and default value to 0

    In your layout add a text string and call it ScoreDisplay with default text "0"

    Whenever an action increases the score, in your event you would go System > Add to (under variables section) and then add whatever score value you want to the variable.

    System > Every tick set the text value of ScoreDisplay to your variable.

    This should get the job done.

  • Uh, isn?t that the reason why plugins exist? Anyway, I?m testing with crosswalk now, I should have an answer shortly

    I am curious how you went testing iframes with Crosswalk? I'm almost at the monetisation stage of my game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you looked into drag and drop behavior? You can define a drop area and an item that is a draggable element. You can then detect when an element is dragged over the top of the defined droppable area and then add or subtract from variables.

    I struggled a little bit to understand your question, so forgive me if I am misunderstanding.

  • First of all, I am new to Construct 2 and prior to asking this I have looked through various threads and experimented with numerous movement types including; Sine, Custom Movement and Bullet to achieve this effect to no avail.

    I've created a JSFiddle to show you exactly what I am trying to do here: jsfiddle.net/cCfDb/ � basically as you can see the ball is bouncing consistently in a sine type movement. How would I go about replicating this JSFiddle example I've created in Construct 2? As my example is HTML5, is there perhaps a way I can use some of this code?

    To put it simply, the ball needs to bounce off each wall, there are 4 walls (1 top, 1 bottom, 1 left and 1 right). And it just needs to hit a different part on each wall every time it hits it. So it needs to go around in a circular part, it can't go up and down (just essentially like my linked example).

    Any help would be gratefully appreciated. If I didn't provide enough information, please let me know and I can provide whatever I can to help you assist me. I hope to be proficient in Construct 2 soon, so I too, can help others like myself.

  • I am relatively new to Construct 2, so bare with me if this is a simple problem I am trying to solve here.

    I am essentially creating a game where you hold your finger down on the screen (on a particular object which is a button) and a timer counts down from 3 before the game starts. If you lift your finger before the timer is finished, the timer resets and the game doesn't start.

    For reference I am using the wonderful TimeManager plugin for Construct 2 for the countdown functionality.

    Pseudo-code for reference:

    While finger is being held down and touching object {

        Timer counts down from 3 seconds

    }

    If (finger is lifted off of the object before the timer reaches zero) {

        Stop timer counting and reset to 3 seconds

    }

    What is the best way I can achieve such a thing? Are while loops able to support multiple events? The syntax isn't all what I am used too compared to other languages like Javascript or PHP.

Digitalsa's avatar

Digitalsa

Member since 7 Feb, 2014

None one is following Digitalsa yet!

Trophy Case

  • 11-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies