Kyatric's Forum Posts

  • I managed in playing it, but it is awefuly long to download, and awefuly fps breaking to play (maybe I was still downloading too, and it didn't like it.

    Nice graphics though, and the mechanics seems nice too.

    BoyHK: with a lot of work, yes it can be made.

  • you actually can't with the way it is implemented.

    You would have to add a function to the plugin.

    And the runtime would go along :

    acts.GoToNewURL = function (url,tab)
         {
              window.open(url,tab);
         };
    

    Where url (destination url) and tab (name of the new tab/window) are both strings.

    The new tab/window depends on how the user set its browser, if it is to open tabs or windows.

    Nothing you can do about this one.

  • Same config as Zen, and same result as Urled.

    My browser seem to be waiting for a umberwind.json file that don't seem to get downloaded.

    An issue with either their delivery, either the limit of my connexion.

  • Yes, eventually! At the moment we don't want to split it up too much until traffic picks up. When it does we can create new forums.

    Ok don't split it too much if you want, but at least make a support/help part where all questions and troubleshots about using C2 goes please.

  • C2 r54; Windows XP SP3; FireFox 6.0.1; ATI Radeon HD 4870

    <img src="http://dl.dropbox.com/u/36472942/construct/bugs/missinghotspoticon.png" border="0" />

    I noticed it a couple days ago and haven't took the time to report it yet.

    Edit: Seems to happen when C2 has been running in the background for a while.

    I just relaunched it and the hotspot icon displays as usual. But it wasn't the first time the icon was disapearing.

  • Joining the congratulations.

    C2 is already such a wonderful product.

    And also thank you for html5. Of course you may not have anything to do with the spec itself, or the fact it exists, but your will to use (and abuse ?) its potential is really a nice decision.

    HTML5 is so powerful and somewhat liberating, it's just fun to deal with it.

    Also nice to see that you got your way around C2 quickly Simon (about 2 weeks since your first post on the forum if I remember correctly).

    Good job and I hope your students like C2 too.

    EDIT: You can click "Post Options" and "Edit post".

  • for(var i = 0, len=instances.length; i < len; i++){ //iterate through instances

    Should fix it.

  • Touch - On touched Sprite => Player - set angle toward (Touch.absoluteX,Touch.absoluteY)

    That's what Ash meant.

    I can't test it as I don't have an iphone or anything of the like, so touch doesn't seem to work, but I guess you should now see the ship rotate towards the sprite as your action depicts.

  • Hi,

    I had setted parameters for expressions of my custom behavior in v51/52.

    It was working as when double clicking the expression in the expression list, the expression would appear followed by ("name_of_parameter") for a string param for example.

    As of r53 and now r54, the expression appears, but not with the parameter.

    Example:

    Editime.js

    AddNumberParam("x", "getBoard[x][]", "1");
    AddNumberParam("y", "getBoard[][y]", "1");
    AddExpression(5, ef_return_string, "Get Board[x][y]", "Results", "getBoard", "Get the content of the cell at submitted X,Y. (1 = obstacle, w = walkable, S = start, D = destination");
    

    When double clicked from the expression list window appears as :

    Sprite.PathFinder.getBoard

    And you have to add the parameters by yourself.

    If you try to use it as it, the tooltip will tell you it is missing parameters and that 2 are expected. But it doesn't appear from the moment you chose it.

  • Kyatrics online version of the C2 SDK documentation is very useful, and from what I see it seems to be a straightforward adaptation of the C++ SDK for CC, so it shouldn't be too difficult.

    Then again, learning is much harder as you get older... :D

    Beware though, the HTML version of the sdk is not up to date.

    Be sure to dld Ashley's SDK package.

    But yes, learning gets hard, but JS appeared quite simple, and when oriented at plugin developement, it is almost "follow the guide" :)

  • Also, checking out.

    Your negative gravity might be canceled by the maxfall speed property

    // Not on floor: apply gravity
    [...]
    // Cap to max fall speed
                   if (this.dy > this.maxFall)
                        this.dy = this.maxFall;
    

    If you also put a negative maxfall speed, then by default, dy will be > to it (-2 is superior to -6 for example).

    Once again, that would be easier to check out with the capx and the modified behavior.

  • When you say "removed the if() case", do you mean you removed only the "if (this.g<0)" line, or did you also removed "this.g = 0;" ?

    If you didn't remove the second line do it.

    Also, maybe you should post a capx and your modified version of the platformer behavior. It would be easier to check out.

  • Hi!

    I've been able to figure out a prototype method for a simple turn based RPG combat system that works in one versus one. But I'm having a hell of a hard time figuring out how I would manage battles with one versus multiple enemies, any enemy type in any order, following turns, etc...

    Like there are a couple orders I'd like to give, how in construct would you say things like:

    "select the enemy at this position and attack him, use these values to figure out the result"

    "take the speed value of all player and non player character in play and apply this formula to then write a list of order of attacks"

    "the enemy at this spot is this particular type of enemy which has these statistic parameters"

    Not expecting a complete logic course 101 but just wondering if you guys could give me a trail or a hint or two that could unblock me. Just a general method idea on how to structure all this and where should I focus my attention. I've been on this one for the past week, so any help is really appreciated!

    http://dl.dropbox.com/u/38319441/RPGtest1.exe

    Need the INI:

    http://dl.dropbox.com/u/38319441/StringTable.ini

    Bless you!

    edit: more clarity

    I think what you need is picking.

    Sprite condition : section Pick

    Pick random returns a random instance of the object type.

    Pick closest test the distance between sprites and returns the closest

    Pick farthest same but returns the farther from the given position

    Pick by comparison allow you to apply the formula of your chosing returning the instance that corresponds best.

    Check also in section "Private variable" Pick object with highest variable & lowest variable.

    Allow you to test directly which instance of your object type has the higher/lower value.

    The characteristics of your monsters should be stocked in private variables, easying picking.

    Then once you picked one instance, use sub events. Any reference to the object type will apply actions/conditions to the instance picked.

    Ex:

    Pick random SpriteMonster

    + SpriteMonster.health > 0

    => Add 1 to SpriteMonster.x

    (For example. Only the picked SpriteMonster health PV will be tested. And only this instance will be moved if the condition is true.)

    Now for groups, or testing each monsters :

    System: For each object / for each object (ordered).

    Such a loop will go through every instances of the object type. You can then test conditions and apply actions. For each iteration of the loop, only the current instance (picked by the loop) will be influenced.

    Then again, you nest your tests/conditions in sub events of the "for each" loop.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not a kongregate user, so I don't really know how it works on their site.

    From what I can see, I'd say you would have to modify the index.html file of an exported project and add the line:

    <script src='http://www.kongregate.com/javascripts/kongregate_api.js'></script>

    With the others "scripts" lines.

    That would allow the API to be available to your application.

    The tricky part would be using

    // Load the API
    var kongregate;
    kongregateAPI.loadAPI(onComplete);
    
    // Callback function
    function onComplete(){
      // Set the global kongregate API object
      kongregate = kongregateAPI.getAPI();
    }

    That initiates the kongregate's API in conjunction with the already present code that launches the C2 runtime in index.html.

    // Start the Construct 2 project running on window load.
            jQuery(document).ready(function ()
            {
                // Create new runtime using the c2canvas
                  ?cr.createRuntime("c2canvas");
            });
    

    Try to put the kongregate's code prior to C2's.

    This might work, or you might end up with an issue because jQuery isn't used for kongregate. I don't really know at this point.

    A plugin would then be the interface calling the JS kogregate's API functions according to C2 events. (this is pretty much the same as using jQuery functions in a plugin, I think the subject is evoked in C2's sdk).

    On the other hand, the server-side API is really simple. Just throw ajax calls at the urls indicated. You don't even need another plugin for that and can handle it through events pretty easily.

    JS is pretty straight forward to get used to (especially if you coded in other languages).

    Just check out MDN JS guide for starters.

    Hope it helps.