LittleStain's Forum Posts

  • Groups are not only usefull for organizing your event sheet, but mostly for the ability to activate/deactivate large pieces of code when not needed..

    For instance:

    If you put all your events for an ingame menu in a group and only activate that group when the menu is visible/available it can save construct a lot of checking time and as such improve performance..

    I wonder why you need to use 200 objects this way..

    Must be a better method, meaning one with less impact on performance..

  • why would you exit construct?

    clone the object open it up in the image editor and start replacing..

  • Something like this?

    Player on collision with enemy

    --Call function "Collission" with parameters

    0 - enemy.uid

    1 - player.health

    on function "Collission"

    -- if function.parameter(1) > 10

    -- pick enemy with uid = function.parameter(0)

    --- enemy destroy

    -- if function.parameter(1) < 10

    --- player destroy

  • Updated it so it works..

  • It should maintain everything..

    The above about the tokenat expression was taken from the manual..

    by indicating what number(index) fram a string(src) seperated by something(seperator)

    the string could be "1,2,3" - the seperator here is "," so if you ask for TokenAt("1,2,3",2,",") you'll get 2

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What kind of example would you want?

    Functions can be used for anything..

  • [attachment=0:3a0o335z][/attachment:3a0o335z]

  • I guess a lot of it has to do with only calling the function on triggered events..

    Also instead of using the x and the y as parameters I suggest using the enemy.uid so you can just pick that enemy to perform the actions on..

  • Should be relatively easy to create..

    C2 can do math itself so you shouldn't even have that hard a time..

    Easiest way would be to create a function to produce the "random" question..

    Just a quick and dirty way of doing things, albeit not the best:

    You could use global variables for the first, second, RightAnswer, WrongAnswer, RightOrWrong..

    set global variable first to choose(1,2,3,4,5,6,7,8,9) (I prefer using choose instead of random, for I find it easier to manipulate)

    set global variable second to choose(1,2,3,4,5,6,7,8,9)

    set global variable RightAnswer to first+second

    set global variable WrongAnswer to first+second+choose(-1,1)

    set Global variable RightOrWrong to choose("Right","Wrong")

    system compare global variable RightOrWrong = "Right"

    set text to first&"+"&second&"="&RightAnswer

    system compare global variable RightOrWrong = "Wrong"

    set text to first&"+"&second&"="&WrongAnswer

    Or something like that..

  • It's not that complex,

    you paste the sprites you want to mirror into the paster object and after that flip it..

  • The paster object doesn't achieve the desired effect, or you can't achieve the desired effect with it?

    I tried and it wasn't a problem, actually..

  • Having said that, I don't believe there is an action to set framespeed directly..

    You can however set the frame and the animationspeed

    I guess you'd have to create a new animation-system by which you set the animationspeed per frame..

    Wouldn't it be easier to clone the first object with all it's animation adn framespeeds and replace the animationframe-sprites with the different ones?

    And if a large part of the sprite is the same and only the things in the hand change, why not make an overlay sprite and crop away all that is the same?

  • I guess if you want to use a string containing all the different frames you could use the Token at expression..

    tokenat(src, index, separator)

    Return the Nth token from src, splitting the string by separator. For example, tokenat("apples|oranges|bananas", 1, "|") returns oranges.

  • The destroy action hasn't been completed if the event hasn't..

    Not untill the next top-event will there be less objects to count..