Yann's Recent Forum Activity

  • Damn I've been so ninja'd!

    Well, Ashley, why is it such a bad idea to create instances of array?

    I was planning on doing that do stream the creation of next levels of a maze while playing the current one. So running the same algorithm on the same array but with an instance variable to differenciate them.

    Like if Array.level = nexLevel -> run the algo on it

  • Just use one sprite with all the different piece graphics in different animation frame. So when you want to create a specific piece, you create this sprite and you set the proper animation frame.

    Then you can differenciate each piece by its animation frame and apply custom rules on them (how they move, how they attack, promotion, etc.)

    Note that this way when you promote a pawn you really just change it's look.

    Also don't forget to set the animation speed to 0.

  • [quote:28kt5we4]that seems strange, especially since I can access the arrays class properties immediately after create object including the UID, which would seem to indicate that the object has been already created.

    ou can access all Action/Condition/Expression of any object type of your project any time. The fact that an instance is created at runtime or not is irrelevant, as there's no parsing of the event sheet to check if you created something before accessing it.

    Anyway, I gave it another try as it is indeed a weird behavior.

    It seems that somehow, creating another array before trying to pick the first one makes the picking fail.

    So that seems to work like that.

    arrayPicking2.capx

    I wonder if it deserves a bug report or not.

    Ashley should be the judge.

  • on Collision -> set speed to 0

  • How did you get the UID you were picking with? If you hard code some precise UID before runtime it's definitely not a good practice (:

    Because UID are affected on start of layout and on creation of object. Depending on some orders it might change.

  • Hehe nice, I made some too but I didn't go that far as making icons :D (mines are just colored square, some checker and some blurry round shape for fog or glow effects)

    So yeah like Kyat, I'll put that in my sprite lib.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you just need to let c2 create the array before trying to pick it.

    It seems c2 need a tick to do that.

    This seems to work as expected :

    arrayPicking.capx

  • My good old November capx

    Still seems nice to me, you even get the wiggling for when you put too much strength

    arrow.capx

  • Heh good thinking, but if you just create a bunch of sprites on start of layout, first I don't think the fps will drop that much, and second it will just drop like a few miliseconds on start and will be fine afterward.

  • You can set the initial frame in property, and to chain different instance... It's probably not exactly what you want, but in this idea I did a rop example a while ago

    rope.capx

    But still without much detail about your game we can't really say that it's the best solution for you.

  • Again, why don't you put all your object in different animation frame of one only sprite and use a bolean to switch control on and off ?

  • I don't know about your game but I'm pretty sure you can put all your potentially hundreds of different objects in one only sprite.

    But to be sure it would be good to explain a bit more about your game.

    Also variable for families... Ash is probably working on it. Families are pretty new.

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann