R0J0hound's Recent Forum Activity

  • How did you get it to crash? Can you post a cap.

  • [quote:qmw8w9st]... how it is decided which bugs get fixed first?

    I can only speak for myself when I say: "Whichever bug I investigate and am able to fix."

    [quote:qmw8w9st]... I think ACE should work reliably before anything else.

    As an amateur bug fixer for construct I concur. Those type of bugs are of interest to me.

  • I like it! Very useful.

  • This is also doable with events:

    http://dl.dropbox.com/u/5426011/examples/append2.cap

    req 0.99.84

    + Button: On Button clicked
      + File: File "dialog.txt" exists
      -> EditBox: Load file "dialog.txt"
      + System: Always (every tick)
      -> EditBox: Append text NewLine
      -> EditBox: Append text Name.Text & " :"&NewLine&NewLine
      -> EditBox: Append text """"&Dial.Text&""""&NewLine
      -> EditBox: Save file "dialog.txt"[/code:2lq13ftb]
  • [quote:jh4a8p41]As far as I know, there's no way to link Construct python scripts together. Like, if a python variable is defined in one script, you won't be able to access it in another.

    Not so, if variable is defined in one script, it can be accessed in a second different script. Basically the state of python (defined variables, functions,... etc) remains after the script is run.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to use conditions to pick (or select) one of the duplicates, or instances. Also it's good to note that after an object is created it is automatically picked.

    One way to pick only one instance would be:

    + Sprite: Pick one at random

    -> Sprite: Set animation frame to 1

  • You need to enable "3d layering" in the layer properties.

  • Instead of using different objects per remote player, use just one :"players".

    if data['player'] != System.globalvar("myPlayer") :
       for w in players:
          if(w.Value("player") == data['player']):
             w.SetPosition(data['playerx'],data['playery'])
             break[/code:303ifi0x]
    
    But until "pick.Value("player")" works use the function object to get the private variable:
    + Function: On function "PVplayer"
    + players: Unique ID is Function.Param(1)
    -> Function: Set return value to Sprite.Value('player')
    
    and the code would become:
    [code:303ifi0x]if data['player'] != System.globalvar("myPlayer") :
       for w in players:
          Function.AddParam(w.UID())
          Function.Call("PVplayer",0)
          if(Function.Return == data['player']):
             w.SetPosition(data['playerx'],data['playery'])
             break[/code:303ifi0x]
  • Here's a fairly simple way to do it using a hash table. The hash is used to map the obj names and the object type's OID. The OID or object ID is different for each type of object. Different instances of the same object type will have the same ID.

    Example: Pickbyname.cap

  • Use the System->Compare condition with the "Sprite.Count" expression

    + System: Sprite.Count Equal to 0
    -> You win[/code:23cjhi1o]
  • [quote:3urh9hhc]But why did you move Forest to Start of layout? So it only runs once? In this case is I think it is not necessary but was that for better form or future problem solving?

    Yea, I moved it so that it is only run once otherwise it will be run every frame. It's trivial in this case, but with large projects it's good practice and reduces the number of events evaluated per frame.

  • Hi Wetasaurus,

    [quote:3q3643ym]So is the player/terrain moving or is it more like a carpet being pulled beneath the object to imply motion?

    The player is moving like normal when it's X position is between 200 and 440, and when the player passes either of those boundaries he is kept from moving and the terrain is moved (like a carpet as you say).

    [quote:3q3643ym]What is this TimeDelta concept?

    TimeDelta is the difference of time from one frame to another.

    [quote:3q3643ym]I'm not used to the "." between events - is that merely a separator in the line or is that fundamental code?

    Fundemental code. See "Object expressions" in the wiki http://sourceforge.net/apps/mediawiki/construct/index.php?title=Expressions

    [quote:3q3643ym]Terrain: Set X to Terrain.X-player[Platform].VectorX*TimeDelta

    Player: Set X to 440+player[Platform].VectorX*TimeDelta

    I'm using the simple formula "rate X time = distance".

    The first line moves the terrain at the same speed but opposite direction as the player. And the second moves the player to the boundary plus any any movement the player was going to avoid jitter. Try setting the second line to just 440 to see the difference.

    Cheers.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound