vishymuku's Recent Forum Activity

  • Hi,

    Has anybody tried hosting the games developed in Construct 3 in a web application built with Vue JS?

    Or any javascript framework like React or Angular which make use of components.

    Basically, I will need to load the game in a single page component.

    If yes, any guidance for this will be of great help.

  • Did my check:

    Chrome 36.0.1985.125

    Windows 7 64bit

    Construct2 r168 game with sounds

    Ran perfectly. Please let me know if I need to test on something else too to be sure.

    the game is not intended for mobile platforms, so I didn't check the android version of chrome release.

    Cheers,

    Vishy

  • Hi Ashley,

    Thanks for the vital info. I have starred the bug post. Last count I saw was 30 stars.

    I'm using r168 for my current project. I have modified the Facebook plugin to suit the project requirements. Hence the reluctance to upgrade to newer stable releases, till the project is finished.

    Will this bug affect r168? I'm sure there'll be a definite answer to this question when the said "date range" is pinned. But if there's a ready answer that 2014 releases won't be impacted, it'll put many a soul to ease

    Cheers,

    Capper

  • by breaking up the steps I get

    [attachment=0:1w5g6hb4][/attachment:1w5g6hb4]

    Thanks for this RamPackWobble. It works!

  • Hi!

    Use the System Stop Loop.

    Manual reference here

    https://www.scirra.com/manual/125/system-actions

    Hi AbelaNET,

    Thanks for the suggestion. I have gone through the manual.

    I have also mentioned in my post that I have used "stop loop". It did not work for me.

    I think stop loop will stop the next iteration of the loop. It will not stop executing the commands in between.

    Cheers,

    Capper

  • Hi Guys,

    Representation of my Loop Problem:

    Variable X,Y,Z = 0

    Condition 1: Repeat 10 Times

    Condition 2: Y < 100

    Add to X 20

    Add to Y 50

    Add to Z 100

    What I want is to exit the loop when Y becomes 100, without executing the 3rd Action (Add to Z 100)

    The Desired result is:

    X= 40 (Action Add to X Executed twice)

    Y=100 (Action Add to Y Executed twice before the condition fails)

    Z= 100 (Action Add to Z executed once since the condition failed)

    The Result I get from Construct2:

    X=40

    Y=100

    Z= 200 (All 3 actions in the loop were completely executed before checking for the condition)

    I have tried different approaches- None of them worked:

    1. Outside loop, I've set System Event to "Stop Loop" if Y >=100

    2. Outside loop, I've set System Event to "Deactivate Group" in which loop is if Y >=100

    Now I understand that all the actions will be performed before checking the condition for loop.

    My Question is : Is there a way to exit the loop without performing all actions when a condition is met. To solution I'm looking for is as follows:

    Repeat 10 Times

    Add to X 20

    Add to Y 50

    IF Y >= 100 Exit Loop

    Add to Z 100

    Is this possible through Construct2? Or do I have to code it in Javascript in C2runtime.js?

    This is simplistic representation of the problem I have at hand. I want to apply this logic to show user's friends' photos dynamically in a facebook game.

    Any help will be much appreciated.

    Thank you.

    Capper33

  • Use a compare condition function. param (0) = 1.

    Hi Makotto,

    Thanks for the suggestion. I have been able to solve the problem with Nimos's Help

    Cheers,

    Capper

  • [quote:11xzk8au]Having said that, I believe, the error in my approach is the way I am comparing the Function parameters.

    Would be great if you can clarify on this part.... or correct my approach.

    Your approach and code is correct. Your problem is that you try to assign a string to a int variable. In your function you return "Even" or "Odd" but the result requires an integer. So if you change "result" to a string it should work.

    hahaha. What a stupid mistake. Thanks for pointing it out. This will get me going again on my learning...

  • This might help:

    Hi Nimos,

    Thanks for the quick response. That's a very clear and detailed explanation.

    I have understood the basic structure now.

    Having said that, I believe, the error in my approach is the way I am comparing the Function parameters.

    Would be great if you can clarify on this part.... or correct my approach.

    Cheers,

    Capper

  • Hello Guys,

    My problem is that I'm not able to understand how to use functions: Pass a value, do some checking and return a value based on the checking. To keep things simple, I have created a simple scenario: Attached the image.

    If Purple sprite is clicked, the variable "clicks" is incremented.

    If Blue sprite is clicked, I am calling a function and also passing the variable "clicks"

    If clicks = 1, I want the function to return "odd"

    If clicks = 2, I want the function to return "even"

    The logic I used returns NaN.

    Please check the image and let me know my errors.

    In this example, I know that we can achieve the desired result without functions. But this simplistic representation is for a complex problem where I have a 16X6 array and I want to set the value in y=5, based on the range in which Y=4, values fall for each row of the array.

    I have read the Manual, and searched the forum for some examples. But the queries are all very advanced. I need some basic info.

    Please do help.

    Thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    Using the plugin is very complicated. You have to create a fresh plugin for this to work.

    You have to manually create Actions / conditions / expressions in runtime.js and edittime.js in exporters/html5/plugins/facebook folder. For this approach you can check the following tutorials written a long time back:

    https://www.scirra.com/tutorials/445/facebook-how-to-get-a-list-of-friends

    https://www.scirra.com/tutorials/446/facebook-how-to-invite-a-friend

    If you find it difficult, the alternative, I think is to custom update c2runtime.js in the exported app folder.

    This is the process I followed:

    1. Use browser object in the project

    2. In the event where you want to invite friends, set the action "go to URL". In the URL field, enter any identifiable text. For Example "Haider Is Great"

    3. Export the project to HTML5

    4. Open C2runtime.js.

    5. In C2runtime.js, define your own JS code to request FB for "invitable friends" and Creating a Multifriend selector

    6. In C2runtime.js, search for Haider Is Great (cntrl+f). Here you'll find "Got to URL" function.

    7. Replace "Got to URL" function, with the function name you created.

    On top of this you'll need send request to friends also.

    Looks complicated. But it is simple. The code examples are available on Facebook developers document pages.

    You'll need to go through the following:

    1. Canvas game tutorial (will give you code for sending friend requests)

    2. Invitable Friends - this is a new feature and it is very useful (will give you necessary code for getting the friend's list)

    3. Multi-Friend Selector - (will give you code for creating menu to select the friends to whom request has to be sent)

    Let me know if this is helpful.

    I'm not a programmer, but I know that my JS developer implemented this in my project.

    If possible, I'll post screenshots of this process later.

    Cheers,

    Capper

  • Hi Kyatric

    Do you think this qualifies for this topic? I have seen some guys asking for examples for Facebook - Leaderboards. I've included screenshots in the solution (not very professional though), to help those who want to build leader boards on Facebook games.

    note: I'll not pester you if you say NO

    Category: Plugins

    Sub-Category: Facebook

    Question: How do I create Facebook Leaderboard

    Link: https://www.scirra.com/forum/how-do-i-quot-facebook-top-10-scores-quot_t103763

vishymuku's avatar

vishymuku

Member since 14 Mar, 2014

None one is following vishymuku yet!

Connect with vishymuku

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies