Yann's Forum Posts

  • Create an instance variable for objA and objB called 'scale' with default 1.0

    System: Every tick
       -> objB: set scale to objA.scale*your_conversion_formula
       -> objA: set size to self.ImageWidth*self.scale,self.ImageHeight*self.scale
       -> objB: set size to self.ImageWidth*self.scale,self.ImageHeight*self.scale

    should work fine

  • did you try webGL on or off ?

  • As I said just use the construct 2 split image tool.

    1. Right click on the animFrame list > Import sprite strip

    2. Set the number of cols and rows

    3. Click ok

    and you're done.

    So yes that only works with same sizes as it's basically a grid based puzzle.

    Also be carefull to put the hotspot at top left for the tiles and the background image (which is also used for rows and cols calculation for the winning condition, so be carefull)

  • computer specs might help

  • You can find them in Layout xml

    examples :

    <instance type="Sprite">
       <properties>
          <initial-visibility>Visible</initial-visibility>
          <initial-frame>0</initial-frame>
          <effect>(none)</effect>
        <auto-mirrorflip>(none)</auto-mirrorflip>
       </properties>
       <instance-variables>
          <myVar>0</myVar>          <----- There
       </instance-variables>
       <behavior-instances>
          <behavior-instance type="CustomMovement">
              <properties>
                 <stepping-mode>None</stepping-mode>
                 <pixels-per-step>5</pixels-per-step>
              </properties>
          </behavior-instance>
       </behavior-instances>
       <world>
          <x>64</x>
          <y>64</y>
          <z>0</z>
          <width>32</width>
          <height>32</height>
          <depth>0</depth>
          <angle>0</angle>
          <opacity>1</opacity>
       </world>
    </instance>

    Also, you can find them used in event sheets xml

    examples :

    In conditions

    <condition id="0" name="Compare instance variable" type="Sprite">
       <param id="0" name="Instance variable">myVar</param>
       <param id="1" name="Comparison">2</param>
       <param id="2" name="Value">32</param>
    </condition>

    In actions

    <action id="0" name="Set value" type="Sprite">
       <param id="0" name="Instance variable">myVar</param>
       <param id="1" name="Value">24</param>
    </action>

    In expressions

    <param id="0" name="X">Sprite.X-myVar</param>
  • You don't need to do that for each star.

    Basically, when you have some repetitive task to do in programming, you have to tell yourself that there HAVE to be a way to avoid copy/pasting.

    Because after all... Good programmers are lazy programmers :D

    The way to avoid that is loops

    basically do a foreach on your stars and look at the corresponding value in the Array

    System: On start of layout
    System: foreach Star
    Array: Value at(Star.ID) = 1
       -> Star: Set opacity to 20
    FirefoxIcon(wtf?): On collision with Star
       -> Star: Set opacity to 20
       -> Array: Set value at(Star.ID) to 1

    And why do you need two dimensionnal Array? Value at (X,Y) you only need a Value at(X). If its value = 0 your star isn't picked, if it's 1 it is.

  • I see, you might like my bit plugin I should release it

  • puzzleDelgado.capx

    it seems you didn't properly split your picture, at least one sprite was scaled somehow.

    To split an image just import it as a sprite strip. It does wonders.Yann2011-12-28 02:22:14

  • well, be carefull, nobody know how much time it will take to have this feature. It's really not easty to implement (when I think about it).

  • I often use "|" but newline looks better and is easier to read

  • 3. Then I think it's not safe. Temporary datas aren't meant to keep datas in a long run.

  • Basically you need a way to tell your stars appart (an instance variable, or its position maybe) and a way to store their status across layout (global variables or global array)

    For instance, set your star sprites to have an instance variable name 'ID'

    Manually set each ID to a unique number each time you create a new star.

    In events things could look like :

    Global variable pickedList = ""  // List of picked stars
    System: On start of Layout
    System: For "" from 0 to tokencount(pickedList,newline)-2
        Star: ID = tokenat(pickedList,loopindex,newline)
            -> Star: Destroy
    Player: On Collision with Star
        -> System: Set pickedList to picketList&Star.ID&newline
        -> Star: Destroy
  • 1. dunno

    2. dunno, but I think browser's cache can have a configurable size limit... don't remember

    3. it depends on what you mean by that.

    4. Construct Classic isn't dead. Some contributors are still working on it (plugins, bug corrections,...). Also, construct classic makes exe files and only exe. These games will only work on windows OS.

  • I'm also an old mmf2 user and qualifiers are just a badly implemented version of what we call families in construct (I heard they will improve it for mmf3...).

    You already have them in construct classic, but it's not there yet for construct 2. Ashley is well aware of our expectations about families and I heard he is or will be working on it soon (:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • vtrix:

    VelocityX and VelocityY are vector components, every movement can be broken up into 2 axial displacements.

    <img src="http://dl.dropbox.com/u/23551572/C2/vectorMovement.png" border="0" />

    For instance if VelocityX = VelocityY and they aren't equal 0, the object moves diagonally.