Roccinio's Forum Posts

  • thank you for your invaluable info.

    do you have any advice for the slope angle as well? what would you do on situation like that?

  • another question!

    i am using scml files for my pick ups as well (coins,power ups etc).

    my game is starting to slow down the more coins i add(100+). the question is ,are spriter files "treated" the same way as normal sprites meaning when they are off screen they are not drawn or the computer has to calculate them even if they are off screen and thus the slowdown?

    what is the best way to use scml files performance wise ?

  • i have the exact same problem!

    i use windows 8.1 with a amd 7870 gpu and my game is 60fps constantly in chrome.

    for the first time ever i used node webkit to see how it works and i have 8!!! fps.

    i just read that when exporting it has even better performance.

    i downloaded the OP demo capx and from 60fps in chrome i see 24 fps in node webkit.

    any idea what is happening?

  • lucid

    also i would like to ask what is the correct way to rotate my scml animation when going up or down a slope.

    i read some posts on how to set this

    if player is overlaping on offset the slope then set angle to slope.angle

    but scml files don't have this since they don't have collisions by default.

    one silly workaround i found is to set the "dummy" background sprite collision box to a a reversed triangle so it will have a small footprint and sort off go up a slope in an angle but sometimes it shutters .

    is there any "proper" workaround to this?

  • why not create a 'dummy' sprite with bullet behavior.then place your real sprite on top of it

    every tick place real sprite on dummy and give your real one whatever angle or behavior you want. this way bullet will not interfere with rotate

  • i guess if you work for hours you make the simplest of mistakes.! you are right it cant be subevent.

    thank you for the tip.will add a fade in effect but out of curiosity what is the technical reason that delays the scaling since it is the first thing that reads in the code ?

    does the 'on initialized' that appears when you import a scml file has anything to do with the above? i mean what will happen if i add the scale there?

    is this a one off or for every instance that is created during runtime?

  • always happy to help citizens in need. it makes me feel like a superhero :p

  • and if you have many instances of enemy's dont forget to add above the comparison a 'for each' enemy and then make the rest subevent.system conditions dont pick

  • and if you want to attack within a certain range

    system compare 2 values

    abs(distance(player.x,enemy.x,o,o))

    is smaller than 400(this is pixels)

    sorry my bad.forgot something.

    then make subevent player.x <enemy.x simulate enemy left

    and

    player.x>enemy.x simulate enemy right

  • if playersprite.x<enemysprite.x then simulate key press left on enemysprite(he must have platform behavior and default controls off)

  • lucid

    for some strange reason with the new plugin i lost the "on animation end"

    if i double click an older condition then it appears.if i try to add a new one then it is not there. weird....

    And something that is really bothering me.maybe it is answered here before but i cant find the answer.

    i create all my characters 50% bigger than they appear on game just in case i want to zoom on them .so at "start of layout" "set scml object scale to 0.5".

    what is the correct procedure to stop them from appearing for a millisecond huge when the layout starts or restarts? sometimes it is barely noticeable others it is just ridiculous since it lasts for some tenths of a second.

  • there are many ways.one good advice would be to read the "basic platformer tutorial" from ashley.

    when you start to get the basics then you can use that knowledge to start adding custom movement or line of sight to make the enemy "smarter"

  • "else" does not pick instances and the way you have implemented this else cancels the above sub-condition since it is nested under "on collision" so it will run if the above it is true.

    try using an instance variable to check things

  • yes use for each before and then add subevent the rest

    for each "sprite"

    .................compare 2 values------------------------------->then do something

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • after a lot of headaches i found a reply post from ashley that explained the situation.

    all system conditions do not pick instances.(compare,trigger once ,else etc) so you need to add a " for each"

    everything else, he has programmed it to automatically pick instances. it has a build in "for each" so no need to add one.

    hope i cleared things up