Yann's Recent Forum Activity

  • how do you die from an image? :D

  • probably unbounded scrolling set to Yes in the Layout Properties

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I meant in Construc 2. In project properties you have an Enable WebGL property.

    The browser object shouldn't have any issue with that since it's not drawn. But it won't hurt to try.

    Also, if you are on chrome you can try F12 and push the Console button to see if there's any error message.

  • RTFM :D

    ok what I call hotspot and sometimes pivot point is called origin (which is a special image points).

    http://www.scirra.com/manual/63/image-points

  • in that case use X for game level and Y for ID. That's not a bad idea because you then don't have to bother with star sharing the same ID in two different level.

    So Array: Value at (Level,Star.ID) is good.

  • Just use the same object and put the image representing them in different animation frame.

    On start of frame set the frame to whatever you want

    and don't forget to set the animation speed to 0. You can access it in the property panel when you are in edit mode.

  • 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.

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann