R0J0hound's Recent Forum Activity

  • Every time one of the keys of the code is pressed append it to a text variable.

    Do a system compare with right(length of code) equal to code to see if it's a match.

    So say the code is udlra.

    u for Up, d for Down, a for A, etc.

    You events (-input events) would look like this:

    Global text variable 'value'=""

    System| compare right(value, 5) = "udlra"

    ---- Enable Cheat

  • If you use this pattern: |index,value

    pets="|1,dog|2,cat|3,fish"

    To get the value at slot:

    tokenat(tokenat(pets, slot, "|"), 1, ",")

    To change the value of slot to newvalue:

    Set value pets to replace(pets, "|" & tokenat(pets, slot, "|"), "|" & slot & "," & newvalue)

    If you just add variables to the list then just append to the end increasing the index each time.

    eg. "|4,cow|5,rock"

    If you want to remove values from the list then instead of "|index,value" think of it as "|id,value".

    pets="|1,dog|2,cat|3,fish"

    Getting the value of a slot is the same:

    tokenat(tokenat(pets, slot, "|"), 1, ",")

    To change the value of slot to newvalue is a bit more complicated:

    Set value pets to replace(pets, "|" & tokenat(pets, slot, "|"), "|" & tokenat(tokenat(pets, slot, "|"), 0, ",") & "," & newvalue)

    Then you can also remove a slot like so:

    Set value pets to replace(pets, "|" & tokenat(pets, slot, "|"), "")

    You could also try using a plugin instead of dealing with just text as it would probably be simpler.

  • only one of the "for each"s are needed

    object1 is the child object type,

    object2 is the parent object type.

    For each object1

    object2 | Pick instance with UID object2.variable

    ---- object1| follow object2

  • It's working here. I never saw the html5 loading animation, and it was just black initially so I refreshed the page and it runs.

  • Are you selecting the correct font name with the Text object?

    The file name is "vistor1.ttf" and the font name is "Visitor TT1 BRK".

  • The Canvas plugin does not use webgl so I would say that using sprites is faster.   Also sprites would use less memory since multiple instances share the same image, whereas the canvas has a separate image per instance.

    If you have webgl disabled you may get better performance by using one canvas and drawing rectangles to that, but you would have to do tests to see if that indeed is the case.

  • Use a double quote.

    Ex:

    """fish""" --> "fish"

    """" --> "

    "This is a quote:("")" --> This is a quote:(")

  • 1. There is no action for it. Destroying one of the objects would destroy the joint. One idea that may work is to destroy and recreate an object and then recreate non-broken joints. It's just an idea, I haven't tested to see if it would work.

    2. I haven't used that behavior that much. A more realistic motion could probably be done with the physics behavior. How? A google search of "2d racing physics" result in some approaches that could be adapted to Construct. Also you could look at the "Your Creations" section and see if anyone else has come up with a good solution.

    3. Try this:

    Set Physics angular velocity to self.Physics.AngularVelocity*0.9

    Change 0.9 to a smaller number for faster damping.

    4. Try setting "Layout properties"->"Unbounded scrolling" to Yes.

    5. From this post here are two examples of how to do LOS:

    http://www.scirra.com/forum/c2enemy-line-of-sight_topic45095.html

    http://www.scirra.com/forum/topic46730.html

  • Here's another idea:

    http://dl.dropbox.com/u/5426011/examples10/slopeGenerate.capx

    It's not perfect but should have constant performance.

  • obody knows ?

    No, nobody had the time to respond in 24 hours.

    To answer the question I don't find any of the behaviors satisfactory so I just did it with events. I move the player one pixel at a time so that it does not jump over the walls.

    http://dl.dropbox.com/u/5426011/examples10/mazedrag.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For your first problem you just need to destroy the initial shadow.

    Start of Layout:
    --Shadow| destroy

    The "A is overlapping B" condition filters object A and loops over all the collision pairs with B. An inverted "A is overlapping B" is just a filter for A.

    So in event 2:

    a. All the ShadowCasters not overlapping the player are selected.

    b. Of the selected only the ShadowCasters with "haveShadow" are selected.

    c. Now each Shadow.CasterID is compared with ShadowCaster.CasterID with this pattern

    1st selected Shadow.CasterID is compared with the 1st selected ShadowCaster.CasterID,

    2nd selected with 2nd selected... and so on.

    You second example runs like this pseudo code:

    For each clown overlapping player:
      if clown havekid:
        select kids with id=clown.id
            destroy selected kids
    
R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound