Atanacius's Recent Forum Activity

  • Just want know if I can with this plugin communicate between each Construct 2 Objects on Layout with project 1 <-> project 2 iFrame ?

    Because I want make a game composed to 2 zones :

    An image will be more explicit than words, so look at the attachment !

    [attachment=0:2n94i92z][/attachment:2n94i92z]

    So, is it possible ?

    if yes a CAPX will be really useful !!

  • I want give my feedback to this plugin.

    First I created a Javascript file which contain a functional Javascript code.

    It works and load like a charm when the JS file is located to the SAME folder of index.html file

    ..

    Meaning that the Scriptfile parameter of the CallJS plugin is set to:

    > myScripts.js
    [/code:eniy3ksa]
    
    But give a reference error when I want use sub-folders like: (created a 'g' subfolder and put myScript.js file into it).
    
    Then
    I set the Scriptfile parameter of the CallJS plugin to: 
    [code:eniy3ksa]
    /g/myScripts.js
    [/code:eniy3ksa]
    [b]OR[/b]
    [code:eniy3ksa]
    g/myScripts.js
    [/code:eniy3ksa]
    
    It won't load the file and give instead a ReferenceError error.
    
    Want precise I use
    Scirra Construct 2 BETA 192 (since I want have the Cordova Export option later!)
    
    And Free Version.
    
    Is it functionnal through a Personal paid Version or not too ?
    Why ?
    How fix it or workarounding it ?
    

    Oh... I found that it is only not functionnal in Node-Webkit preview or HTML 5 preview...

    Well, same problem like the Load file action from Request URL within AJAX plugin.

    Don't think you can do anything for that, but, look at this useful post for make a workaround for making it working:

    (

    I asked this question : Why we can't locally load files in Preview Mode in Node-Webkit ??

    Then I got a working answer from R0j0hound:

    [quote:eniy3ksa]

    We can though. In node-webkit preview if you use "document.xml" as the file it will look here:

    "http://localhost:50000/document.xml"

    If you want to get the file from the same folder as the capx you need to type it in explicitly:

    "C:\Users\rojo\Documents\c2projects\document.xml"

    And to make it work in preview or in export you could use a global like this:

    global text AppPath = "C:\Users\rojo\Documents\c2projects\"

    Start of layout

    System: [NEGATE] is in preview

    --- set AppPath to NodeWebkit.AppFolder

    And then request any files with:

    AppPath & "document.xml"

    )

    So If you can give us the ability to SET the Scriptfile url dynamically within a Construct 2 Action like:

    -- Set Scriptfile url to

    We can then be able to do this :

    global text ScriptFileAppPath = "C:\my\external\path\with\subFolders\"

    Start of layout

    System: [NEGATE] is in preview

    --- set ScriptFileAppPath to NodeWebkit.AppFolder

    And then requesting our files with the new Action I talking about:

    -- Set Scriptfile url to ScriptFileAppPath & "myScripts.js"

  • I want give my feedback to this plugin.

    First I created a Javascript file which contain a functional Javascript code.

    It works and load like a charm when the JS file is located to the SAME folder of index.html file

    ..

    Meaning that the Scriptfile parameter of the CallJS plugin is set to:

    myScripts.js
    [/code:1lkb2zzb]
    
    But give a reference error when I want use sub-folders like: (created a 'g' subfolder and put myScript.js file into it).
    
    Then
    I set the Scriptfile parameter of the CallJS plugin to: 
    [code:1lkb2zzb]
    /g/myScripts.js
    [/code:1lkb2zzb]
    [b]OR[/b]
    [code:1lkb2zzb]
    g/myScripts.js
    [/code:1lkb2zzb]
    
    It won't load the file and give instead a ReferenceError error.
    
    Want precise I use
    Scirra Construct 2 BETA 192 (since I want have the Cordova Export option later!)
    
    And Free Version.
    
    Is it functionnal through a Personal paid Version or not too ?
    Why ?
    How fix it or workarounding it ?
  • R0j0hound:

    I want thank you carefully, you unstucked me!

    AND even given me an ability to have an autoswitchable way to debug the game !

    Must say, I was knowing that the "NodeWebkit.AppFolder" was fixed to the path where Node-Webkit for Construct 2 has been installed.

    But even by playing with "..\" strings for goback in directory it won't work!

    So, with your method all work as intended an like a charm !!

    THANK YOU CAREFULLY !

    (Can't upvote your answer due to my not enough Reputation points on the forum, but yes, will do that in one day !)

    Also, now I'm unstucked with this behavior, I can continue to design my game, next way is going to give to my game an ability to multiload EVERY XML files through a precises folders (and subfolders too), do you know a Plugin able to doing that ?

    Or way better a CapX sample for learn how?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks a bunch for your help !

    So...

    Ok like I said, (and I'm afraid to discover that), the free version is limited to do that (Exporting a Node-Webkit project), but the problem is that the PREVIEW MODE won't work with external local loaded files through both Paid Construct 2 version/Free Construct 2 version.

    So my question is now reallocated to Ashley (and any Construct 2 software developpers):

    Why we can't locally load files in Preview Mode in Node-Webkit ??

    * Is it a thing already submitted as a bug?

    ** When this will be fixed ?

    Thanks for answer.

  • Hi! I want to add the files seperately in different folders and it seems to work fine when I export the project as node-webkit and use relative paths like "data/ads/1/1.txt". the contents were loaded and displayed in a textobject but is it possible to use this in preview mode somehow? (put the folder/files in the project folder for example?)

    PS: It seems this does not work with Sprites (Load image from URL). Is it possible to use local files/paths? I tried a relative path like in the example above "data/ads/1/1.jpg".Bl4ckSh33p2014-02-11 13:10:22

    Same problem, It seems in Preview mode relative path don't work !!

    (which then make preview mode in Node-Webkit totally useless )

    Fix that please...

    I want really buy this software, but with the NO-ABILITY to easily load files (external files meaning, since my game idea is to make it moddable !), I'm then refrained to buy it..

  • Superb plugin!

    I use it in my current test project and I start to loving it !! Thanks !

  • Your Behavior is powerful, indeed it will be useful, I'm new to Construct 2, but since I have problem with the XML/AJAX load file plugin which that seems be unable to workaround, I will certainly go back to my old Game Making software..

    By the way, thanks for your excellent mods !

  • I want add that with the Node-Webkit preview, I get the 404 error too.. So..

    Please, tell me...

    Is will working in a Personal purchased version ?

  • Hey, hello everybody !

    I'm using the FREE version of Construct 2. (I tested both last STABLE and last BETA versions).

    It seems my event code not working as expected!

    By the way I read how doing it on page which I can't show you the links since the forum don't permit me to add them

    the official manual page for loading an XML file through an AJAX call of the AJAX Plugin.

    and the tutorial page for know how using the XML Plugin and then make node get/set through the XPATH Syntax.

    Nothing seems working for me, all I got is 404 NOT FOUND when debugging the AJAX result content..

    My XML file must be dynamically loaded through RUNTIME (and so it's not good to include it at EDITTIME in Included Files to my Construct 2 project.

    I tested also with an other XML file instead mine, so, aswell this XML code:

    <?xml version='1.0' ?>
    	<chapter1>
    		<hint id='intro1'>Good morning Mr Bond, how did you sleep ?</hint>
    		<hint id='intro2'>I have prepared your breakfast for you</hint>
    		<hint id='intro3'>Come find me when you're finished</hint>
    	</chapter1>
    [/code:ux1aky2p]
    
    [i]seems not loaded through my project.[/i]
    
    [b][u]This is like my OBJECTS are:[/u][/b]
    
    I have three objects:
    [ul]
    [li]  object type: "AJAX Plugin", named as: utility_AJAX[/li]
    [li]  object type: "XML Plugin", named as: utility_XMLDoor[/li]
    [li]  object type: "MultilineBox Plugin", named as: MultilineBox (object found at: )[/li][/ul]
    
    [b][u]This is like my EVENTS are:[/u][/b]
    [code:ux1aky2p]
    CONDITION: (SYSTEM) -> On start of layout
    ACTION 1: [utility_AJAX] Set request header "Access-Control-Allow-Origin" to "http://localhost:50000/"
    ACTION 2: [utility_AJAX] Override MIME Type with ".xml files: text/xml"
    ACTION 3: [utility_AJAX] Request "pop.xml" (tag: "tmp")
    
     NOTE: don't work even if I don't add Action 1, 2  to action event's line)
    
    CONDITION: [utility_AJAX] -> On "tmp" completed
    ACTION 1: [utility_XMLDoor] Load XML Document from string utility_AJAX.LastData
    ACTION 2: [MultilineBox] Set text to utility_AJAX.LastData
    [/code:ux1aky2p]
    
    My pop.xml (test file) is located in : "%ROOT_Construct2_InstallationDirectory%\mesProjets\dynacoGame\pop.xml"
    
    So... Is it impossible to what I want achieve in FREE Version (if yes, I will buy the Personal Edition), if not, what I'm doing wrong?
    
    Also, is it possible to load my XML file if I locate in there path: "%ROOT_Construct2_InstallationDirectory%\mesProjets\dynacoGame\_gameRes\Level1\pop.xml" ?
    
    THANKS for all answer, since I'm just stuck in a way I can't unstuck me myself..
    
    ps: I tested each times in Construct 2 HTML5 preview mode (and both Chrome or Firefox or even IE)
Atanacius's avatar

Atanacius

Member since 28 Dec, 2014

None one is following Atanacius yet!

Trophy Case

  • 9-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

11/44
How to earn trophies