horoblast's Forum Posts

  • Maybe these tutorials can push you in the right direction: scirra.com/tutorials/top/pa ... e=detailed .

    It seems my link doesn't really work, so go to Tutorials => Intermediate => AI <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

  • You might see the source code of scirra.com/manual/153/websocket official websocket plugin first.

    To include external file, add

    "dependency": "file_name"

    in edittime.js, see SDK for more detail.

    Ah great, thank you. I'll figure it out .

  • The best way: scirra.com/manual/15/sdk use the Javascript SDK

    Hacky quick fixes: the scirra.com/manual/110/browser:tsk04xai]Browser object can execute Javascript, and you can call the [url=https://www.scirra.com/manual/149/function Function object functions from JS. Ah yes thank you, this is getting me partially where i'd have to be, but i'll get there . So say i wanted to call a function in a JS file somewhere, then I just use the execJS from browser? How does it know which file to look into? And then, when writing the own plugin, where do i put my functions so they can be used in construct 2? Like a function Next() in my JS file that checks if the data has been sent to a DB (like age, gender, etc...) and then that function calls a function object in Construct 2, that then initiates a set of actions?

  • rexrainbow hi there, this is just a test because i have no other way of contacting you (semi-)directly. I don't have 500 reputation yet therefor Scirra doesn't allow me to PM people (to counter spam users). If you receive a notification of this tag, could you please take a look at my issue when you can? On another post I made, you answered me your repo of several tens/hundreds of plugins. I'm unfortunately on a (sort of) tight schedule, so I can't spend hours digging in your most hughe and great collection of plugins.

    Maybe you could help me with my issue directly, or send me on my way referring to a plugin you previously made that's sort of the same?

    MUCH appreciated!

  • Here's the jist. We're creating a webpage, with a little bit of HTML & CSS (modals). We've made a back-end with API and the javascript from the page should load the data (via the API) locally. Now we modify and can work with the data (just on like any site).

    Now I want my data i just brought in to be able to be used by construct2 and vica versa, be able to do calls to Construct 2 from our JS, and the other way around (from our JS to Construct 2). All of this will be inside an IFrame.

    For example:

    The game starts, construct 2 game runs in the background (some cars are moving around) while the first html & css modal appears on top of the construct 2. This is going to be a small questionnaire modal (age, where you're from, gender, ...) and all will be handled outside of the game/construct (the game is still running automatically in the back ground).

    But then when the user completes his "registration" and clicks a button in html5/js ('Go to Game' or something), i have to trigger something in construct 2 so that the game goes from layout 1 to layout 2. I already know how to do this INSIDE construct 2, which is easy, but now i want it to work so that when a user presses a button in html5, a construct 2 function/event is called.

    Example 2:

    The game starts, does it's thing and after a certain period, say 5 seconds, another modal pops up with a question for the user. When he answers the question by clicking a button (in html5/js), the modal will disappear and something in construct 2 has to be triggered so that the car moves forward. When the car hits a certain point, another call has to go out from Construct 2 to our JS so that another modal may pop-up. etc...

    Does anyone know how to do this exactly?

    Here's the jist. We're creating a webpage, with a little bit of HTML & CSS. We've made a back-end with API and the javascript from the page should load the data (via the API). Now we modify and can work with the data.

    Now I want my data i just brought in to be able to be used by construct2 and vica versa. All of this will be inside an IFrame.

    For example:

    The game starts, construct 2 game runs in the background while the first html & css modal appears on top of the construct 2. This is going to be a small questionnaire modal (age, where you're from, gender, ...) and all will be handled outside of the game/construct. But then when the user completes his "registration" and clicks a button in html5 ('Go to Game' or something), i have to trigger something in construct 2 so that he goes from layout 1 to layout 2. I already know how to do this INSIDE construct 2, which is easy, but now i want it to work so that when a user presses a button in html5, a construct 2 function/event is called.

    Does anyone know how to do this exactly?

  • github.com/rexrainbow/C2Plugins Here is source code of my all plugins/behaviors, feel free to dig them,

    Hey thanks for answering, i'll be sure to take a look at them after my lunchbreak!

  • Basically i've just run over the information about JS SDK a little, but my deadline is reaaaaaally close by. I have my game made, but now i have to integrate a website on top of it, with html&css modals, and data being send and read to/from a database (in JS). I think i understand how to get variables, functions, calling functions etc, but i'm not too sure.

    Does anyone want to share their game/creation where i can see how you do it? I'd love to just try it all out myself, but i fear i might not have the time due to the deadline... If that's not possible i guess i'll have to crunch and work in my weekend, but i'd rather not (and relax after a hard work week).

  • Pode

    I'm getting the following error message after a few seconds: imgur.com/3yF3Gd1 .

    Any idea what may cause it and how i can fix it?

    Much appreciated.

  • horoblast: youtube.com/watch How to make cut scenes and fade transitions using Finish State Machine

    Oh nice, thank you.

  • horoblast Thanks for links. Yes, I added the music on start of the layout and it is in loop. When I run the game on my computer, It is working fine. Every sound is being playing according to the requirement but when it was run on my phone, the sounds aren't being played until and unless I tap on the screen. I'm not sure where it when wrong.

    Huh, that's odd... hopefully you were able to fix your issue using the other person's help.

    If not, maybe these links can provide some help:

    no-sound-in-android-cordova-with-xdk-1912-export_t130051

    stackoverflow.com/questions/1044 ... ame-engine

    .

  • Update. Now in 2015 with r206 it is possible to achieve the same effect thanks to the Fade behavior.

    Here is a dl.dropboxusercontent.com/u/36472942/construct/forumhelp/FadeIn_FadeOut_layout_2015.capx commented simple example.

    Hey there, i hope you'll see this message and can answer me . I've tried out your example, but it doesn't start on the first page. How can i modify your example so it starts black, fades out slowly to the first page and when a button is clicked it should fade back in, then fade back out again showing the second page?

    Greetz, horoblast.

  • Try Construct 3

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

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

    i haven't had to work with sounds yet in construct 2 but i did some searching, maybe these links can help you further:

    scirra.com/tutorials/181/ad ... ners-guide

    scirra.com/manual/109/audio

    scirra.com/manual/84/sounds-music

    youtube.com/watch

    Did you try adding the music on a system -> on start of layout?

    Maybe try it with a variable set on 1 and "on start of layout" + condition "if variable = 1" play your track? If it should loop you can try putting/setting the variable somewhere else.

    I've only been trying out construct 2 for a few days now so i don't have much experience in it either, but i hope this could help you in one way or another so you can find a solution to your problem.

  • That's part of the answer. The other issue is even if you used that expression every tick it would be the same. You need a variable that you change over time and use that for the lerp. This could work:

    global number go=0

    global number t=0

    on click

    --- set go to 1

    go = 1

    t < 1

    --- add dt to t

    --- road2: set scale to lerp(0.1608, 0.0804, t)

    Great, thanks for the answer, when i get to it i'll give it a try

  • Hey there,

    i've been trying to make an object appear (spawned from another object) and then do some work on it. It has to "drop from the sky" onto the background. I want to create this effect by using fade in & a set scale function. This is what i have:

    onClick (on a button) => road2 => set scale to lerp(0.1608, 0.0804, 2*dt) .

    Any ideas why it doesn't do anything? Right before this action i do a change angle and fade, and they both work.