lennaert's Forum Posts

  • How do I do that?

    I tried adding a script and putting this code in there and making it before the request....

    and it didnt work...

    In construct editor, right above your Ajax send request.

    Add:

    Action: Ajax Object -> Set request Header

  • You could try and add these headers right before the request:

    header: "content-type"

    value: "application/xml"

    header: Access-Control-Allow-Origin

    value: "*"

    header: "Access-Control-Allow-Headers"

    value: "*"

  • No idea if my bug is similar to yours...

    but I am having trouble using my Ajax...

    If your using PHP pages, you likely need to add:

    header("Access-Control-Allow-Origin: *");

    header("Access-Control-Allow-Headers: *");

    At the top of the php pages.

  • I believe this is due to the nature of the construct 3 preview mechanisms, once exported and installed/hosted, they work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Does anyone use C2 for robotics coding?

    Any tips are helpfull couse im just starting with robotics.

    Thank you

    Not really, the closest I seen so far has been interfaces towards arduino like materials. (a gui on a webpage to control elements)

    But not actually coding stuff with construct for the embedded software side of things.

    Construct 2 and 3, use HTML and javascript mostly.

  • Also contact your bank to see is there any issue in sending payment from Russia

    Due to the ongoing conflict in Ukraine, europe and lots of banking systems have sanctioned Russia. Master, visa, both suspended services in Russia. Swift banking system is blocking Russian customers.

    And if I am not mistaken, paypal suspended services in russia mid march somewhere already ....

    I am guessing that MIR banking is also not working with transactions towards european countries. (or UK for that matter)

    This will be a tough one.

  • What do you mean with controlling the crosshair with the right stick. Like in omnidirectional, when you move the stick, the cross hair moves around ?

    Or a simple cross hair in the direction of where the player is aiming ?

    The first one is rather hard, as the rest of the game is not suited for that movement, unless you overhaul a lot.

    The last one should be easy:

    add an image point to the player sprite, to the right of the player (how far you would like the crosshair to appear.

    With the crosshair somewhere in the layout, and pin behaviour added.

    Crosshair set position to PlayerGraphics.imagepointX(2), PlayerGraphics.imagepointY(2

    Crosshair pin to PlayerGraphics.

    or

    Crosshair set position to object PlayerGraphics at image point 2

    Crosshair pin to PlayerGraphics to imagepoint 2

  • Thanks, you have mail ^_^

    It works well, room for improvement perhaps, but a decent base for the multiplayer functionality.

  • I have now found the answer "Wrap vertical Clamp to edge" on tiled background

    Thanks!!!!!!!

    Hah, well, that was unexpected.

    Tested it in an example, and saw the stretching too.

    So the blue line was a bit of stretched image.

    Nice self solve lol, and thanks for the feedback

  • The line looks light blue, ... in your project tree I see a blue line called colliderground .... Is that thing perhaps on top of your ground image ?

  • Game looks simple enough, 50 bucks and I'll fix it up for you.

    send the game to my email if you agree **edited** , I'll get it working with the multiplayer plugin.

  • I think your looking for something like this:

    construct.net/en/tutorials/super-spooky-house-part-1196

  • create an instace variable (state) to store the enemy state

    On line of sight compare the angle from enemy to player angle(enemy.X,enemy.Y,player.X,player.Y) and based on this result, change the enemy.state to running_away_left ... running_away_right

    If enemy.state = running_away_right Set enemy.position to Self.X + 1

    You need also a condition to stop it and change the enemy.state

    This however lends itself for some issue, when the player is turned with his back to the enemy. The enemy would run at the player in this matter..

    A simple compare,

    Enemy.X < Player.X (enemy is on the left of the player)

    Enemy.X > Player.X (enemy is on the right of the player)

    Gives you a clear indication on which side the enemey and players are, run away appropiately.

  • hmm ...

    Make a sprite

    events:

    every tick

    set sprite to position

    sprite.X to mouse.X

    Sprite.Y to mouse.Y

    Thats the basic so the images gets positioned to where your mouse is hovering.

  • For arduino, look into the map() function, it maps a range, over a given range

    arduino.cc/reference/en/language/functions/math/map

    From the top of my head it will be something like:

    NewKnobValue = map(KnobAnalogueValue, -100, -99.9992370605, 0, 100);

    That will make your -100 to -99.9992370605 return its equavalent of between 0 to 100. (-100 being zero and 100 being -99.9992370605)

    Thus, you can use decent numbers for Construct :)