Yann's Forum Posts

  • indeed bad saved file :D

    you can redownload

  • physics is overrated

    arrow.capx

  • Why using physics?

  • You can try setting different value for min and max speed for each NPC.

    But for it to work correctly, you have to change all global variable (which are just "helper" variable to avoid big mathematical expression) from global variable to instance variable to store the proper value of each instance.

    Like that :

    carAI.capx

  • Place a sprite (basic red square for instance) at the end of your level, set it to invisible in the properties and in event :

    Player overlap Sprite : go to next layout
  • Nope I opened them in photoshop and batch saved them

  • It seems like your sprites were somehow at fault

    try these UFO.zip

  • You just have to separate checking and picking

    destroyByUID.capx

  • Oh yeah, so as in Maxum's example, the dealt card have it's value and color more or less embedded in the number of the animation frame he is on, you will have no problem to know which card you have on the board.

    You will just have to compare the value and color of the card you drag and the card that you will overlap.

    Easy Peasy.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • save as single file and update your link

  • For me to have a usefull opinion on your question, I need to know more precisely how your game would be played.

    'cause maybe there's some easier ways to do, not what you say here, but what you want to achieve.

    Without telling me the end result I can't really guess if you take an easy or a hard path... a wrong or a good one.

    Here it's as if I look at your game too closely.

  • Yeah Atk_Man.Y can never be greater than Atk_Man.Y

    The same way you can't be greater than yourself

    It's a bit philosophical but it's so true.

    Also Every tick here is totally useless, all the condition in the event sheet are always read every tick.

    If you go to the plugin section you might find something for Z-ordering... I think I saw something about that

  • You have two things involved that are close to each other but quite differente in application.

    On one side you have the Array with all the card shuffled or not

    On the other side you have the number (from 0 to 51) from which you can guess the value and color (see my last post for that)

    Basically, you can really do anything that you want with this system.

    The cards will always keep the same order in the deck, so you will always find out witch card has been drawn and where (in the deck).

    If you have some game that involve putting back card in the deck you will just have to move values inside the Array

    If you have some game that involve other deck, just use another array

    However, if you want to know if you have pairs, flush, straight, three of a kind... that kind of stuff, it will me more tricky

    I guess you could start by loading each hands on a two dimensionnal array (set value at(hand,index) to cardValue) and compare each member to count similarities (how many cards have the same value or color) or sequences (what is the biggest sequence and what is it?)

    Well... dunno it's getting complicated and I don't even know if I'm in the scope of your question...

  • Many ways come to mind

    Oh wait... No I can only see one way

    1/ you put all your anim in the same sprite. You name your anim like that:

    PokemonName_RStanding
    PokemonName_LStanding
    PokemonName_RRunning
    PokemonName_LRunning

    (replace PokemonName by each of your pokemon.... name should match the list I will mention below)

    2/ you create a global variable named "PokemonName" type text

    3/ you create a global variable named "PokemonList" type text

    4/ you keep a .txt file with you with the list of your pokemon (for easy management)

    pikachu
    psychokwak
    dracofeu
    smogogo
    ...

    (yes I know... french version)

    Brawl event sheet :

    5/

    start of layout 
             -> set PokemonList to (and you copy/paste your list)
             -> set PokemonName to tokenat(PokemonList,int(random(tokencount(PokemonList,newline))),newline)

    6/ you prefix all your animationName call with PokemonNam&"_

    like :

    set animation to PokemonName&"_RStanding"

    It should work fine (:

    The idea is to use a string which contain a the list and use the indexation capabilities of the tokenat(string,index,separator) function

    The separator is the newline special word which detect... new lines :D

    Neat stuff... I should write a tuto on that... (actually I started one some weeks ago an... well... lazy :D)

  • Depends on what you want to achieve in the end

    sometimes, physics is just not the way to go, a bullet behavior can be enough for your gameplay... really depends