Yann's Forum Posts

  • +System: For "groundX" from 0 to worldWidth
      Local variable pickUID=-1
      +System: For "groundY" from 0 to worldHeight
        ->System: create object item on layer 0 at......
        ->worldArray: set value at (loopindex("groundX"),loopindex("groundY") to 1
        ->System: set pickUID to item.UID
      +worldArray: value at(loopindex("groundX"),loopindex("groundY") = 1
      +item: pick instance by UID pickUID
        -> item:set animation to 3

    Two remarks:

    1/ As far as I know, the item created is picked only in the action block in which it is created. In the next event only the picking by condition is used.

    2/ 'Current value' as well as 'Current X', 'Current Y' and 'Current Z' should only be used in an 'Array foreach element' loop. That's what the "current" is about.

  • I would probably do it like that

    fadeDissolve.capx

    also I can't download your capx

  • You do not have permission to view this post

  • That's your solution rotatingPlaneShoter.capx

    Layers have their own coordinate space, the behavior you get is logical and expected. But unfortunately not well understood.

    The answer is that you don't really want to rotate a layer, but to rotate the entire layout and counter rotate the plane.

    Also I tweaked the shoting... just for fun.Yann2012-02-02 12:10:56

  • The diabloLikeMov.capx zenox's link refers to is this one diabloLikeMov.capx

  • I see the same problem, it seems to be caused by the webGl linear sampling.

    For now, you can solve that by switching to Point sampling in the project properties.

    I wonder if it's a graphic card issue as Cross_ doesn't seem to have this problem.

    If it helps, my card is a NVidia GTX 460 and I'm on win server 2008 r2 (it's like win 7) 64bits.

  • send capx /o/

    With just a few problematic ressources if you don't want to reveal your whole game

  • create cleaner png.

  • For the quitting problem

    -> Monster: Destroy

    -> System: set timescale to 0

    Should work

    For the other question... dunno, go see the plugin section in the forum, there's a list, maybe stuff like callJS or Jessejoh's HTML Elements pack could help.

  • newt's way is good if you want to start with different animations. As you don't have an "initial animation" property.

    But instead of 'trigger once' I would probably use a 'start of layout'.

  • Yeah tokenat definitely.

    With array it's a pain 'cause you have to set each lines with one action

    Array: set value at (0) to "good start"
    Array: set value at (1) to "keep going" 
    etc

    With tokenat you just do a

    Global text dialog = ""
    System: Start of layout
      -> Set dialog to [insert your tokenized text]

    And then call each token as Tokensom (hehe) said

    My little advide :

    Build your string with newline as separator

    dialog = "good start
    keep going
    almost there"

    And then you can access each of them with tokenat(dialog,[index],newline)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The diabloLikeMov.capx works as follow :

    When you click anywhere on the screen (event 1) you set two variables of the collision box of the character to "where you want to go" (xTarget,yTarget).

    I also set a 'moving' boolean to true. It's like a flag that means "yeah now you move!"

    Basically I use these variable to drive the character.

    The event 2 just check if you are close or not to the target. It's to avoid imprecision problems. If you are less than 5px from the target, then stop ('moving' to false)

    The hardest part is probably the

    event 5 -> Collision: Set position to ....

    This event just move the collision sprite a little each tick toward the xTarget,yTarget position.

    All the other things are just to change the animation according to the direction of the movement. The "aPref' variable means 'animation prefix' ("B" for Bottom, "T" for Top, "R" for Right and "L" for Left plus 4 combinaison for diagonal movements)

    (I updated the diabloLikeMov.capx with some comments)

  • The guy made it on mmf... And yeah it's complicated, but mostly because it's hard to do simple easy to read stuff on mmf.

    Basically you store references of object in an array and use these reference and the array coordinate to create the proper object in the proper places.

    But if you are new to c2, a level editor might be too much to handle.

  • if it's just the starting frame you want to change, just set it in the "initial frame" in the property panel for each of your instance