Roccinio's Recent Forum Activity

  • Please read about tilemaps and tiled background on the manual and on the forum .it will help you to get started

  • Asley

    lucid

    LittleStain

    unfortunately no my friend.

    my results so far .

    if i use the build in commands for my scml files (on landed,on moved etc)

    it works in all instances correctly.

    if i want to trigger an animation without the above i need to apply the "trigger once while true" so it will not get stuck on the first frame. this workaround works for only one instance perfectly. i can call any animation i want depending on the situation.

    but if i have multiple instances then the "trigger once" does not pick instances and it works only for the first it picks.

    any ideas from the other gurus in here?

    mr. Asley please?

  • LittleStain

    thank you for your time!

    if i use "else" the it does not pick .it just makes them all behave the same.

    i have a sprite box with path finding behavior that i set invisible and i add "every tick" on top of it my scml(spriter) animation.so the box moves.the "animation"(spider) just moves on top of it and it just changes its animation depending if the "box" is moving or not.since they are in a container every time i spawn a "box" it spawn a spider"animation" on top of it.so if any of the "boxes" has LOS to the player then enable "pathfinding" and move. so play "walk" animation for spider.

    if not "set pathfinding disabled" so it stops and play "spider" animation "idle".

    my problem is that because the "has los" or "does not have los" runs every tick when it is true the animation will loop every tick so it will get stuck on the first frame(it is not frame it is tweening but you get the picture :p).

    if i add a "trigger once while true" it will run fine the animation because it will not loop every tick BUT this command does not pick instance so it will only work on the first available instance. not the rest.

  • LittleStain

    if i use "else" the it does not pick .it just makes them all behave the same.

    my problem lies in the fact that if i do not use "trigger once while true"

    then my animation loops every tick so it gets stuck on the first frame.if i use it it plays fine BUT it does not pick instances so it only triggers for the first instance and the rest of them still play the old animation.

    example. 3 spiders with LOS 600pixels

    if the see you (<600) play "walk" if not (>600) play "idle"

    they cant see you at first so the are all "idle"

    you move closer and all of them see you. only one will play "walk" (using the "trigger once")the other will stay "idle"

    now if you move away only one will play"idle" the rest will stay on animation "walk"

    see my problem? :)

  • Games

    i lost you there for a moment but thank you for your interest to help me.

    the problem is that for conventional animations (png's) using the platform behavior ashley has programmed conditions that trigger animations (on landed,on stopped etc).

    in my case the system correctly picks every instance change(los ,NOT los) -it is built in ,you don't even have to say "for every"-,every instance variable change everything.

    it even changes the animation as intended but to ONLY ONE INSTANCE at a time. the rest are ignored.

    i hope i was more clear this time

  • lucid as well :)

    hi to the community !i need your help.

    for the past 2 days i am trying to figure out what is going on until i stumbled on this thread.http://www.scirra.com/forum/r154-for-each-and-trigger-Once_topic82932.html

    i have for example 3 instances of a scml animation(spriter).it is in a container with a sprite box background and i run it every tick on top of it.

    i have a LOS (line of sight ) behavior on my sprite box

    if "sprite box" has LOS on player----set scml animation to "walk"

    if "sprite box" has NOT LOS on player----set scml animation to "IDLE"

    if i use this, then the animation gets stuck on the first frame (no tweening no nothing)because i think it runs every tick so it resets 60 times per second and plays from the beginning all the time .

    if i add a sub-event "trigger once while true" it works(the animation) up to the moment it switches between LOS and NOT LOS and the reason is in what Ashley said that it is a system condition(the "trigger once") and does not pick instances!so only one instance switches between idle and walk and the rest stay on the previously played animation (wish i knew that 2 days ago :p) maybe i could use uid but that would be a pain to implement if i have 20 instances of my scml in every layout.

    so any ideas on what to do to solve this?

  • Ashley

    Thndr

    Guys please help!

    for the past 2 days i am trying to figure out what is going on until i stumbled on this thread.

    i have 3 instances of a scml animation(spriter).it is in a container with a sprite box background and i run it every tick on top of it.

    i have a LOS (line of sight ) behavior on my sprite box

    if "sprite box" has LOS on player----set scml animation to "walk"

    if "sprite box" has NOT LOS on player----set scml animation to "IDLE"

    if i use this, then the animation gets stuck on the first frame (no tweening no nothing)because i think it runs every tick so it resets 60 times per second.

    if i add a sub-event "trigger once while true" it works(the animation) up to the moment it switches between LOS and NOT LOS and the reason is in what Ashley said that it is a system condition and does not pick instances!so only one instance switches between idle and walk and the rest stay on the previously played animation (wish i knew that 2 days ago :p)

    so any ideas on what to do to solve this?

  • found it!

    it appears that without the "trigger once while true" command the animation gets "stuck" because it always loops every tick.

    so for future reference the built in commands like on landed ,on moved etc have programmed inside them the trigger once while true.

    everything else needs the above! :)

  • hi to all once again!

    could someone please help with this?

    i import a scml file with 2 animations.(shoot , idle)

    i set a "dummy" sprite and set "every tick"my scml file on top of it.i give the dummy sprite a platform behavior and by using the animation triggers (on jump, on falling ,on landed etc)i can switch between the animations"shoot."idle" perfectly and they play fine.

    but if i have a LOS(line of sight) command like

    if "dummy sprite" has los to player ---> play animation"shoot"

    if "dummy sprite" has NOT los to player ---> play animation"idle"

    the animations trigger but the are stuck on the first frame of their animation!no tweening no nothing.

    any ideas?

  • SgtConti

    I would like to thank you for taking your time to help me.

    I needed this for a in pause menu in my game.by checking one I could for example turn the sound on or off.

    with the unfocus command it works so I am happy even though I don't understand why it gets stuck. but who cares? :)

  • SgtConti Ashley

    try the new capx without the plugin.the same result.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • EDIT: i created a new CAPX without the plugin and it has the exact same result.so this is a construct 2 thing.

    Link to .capx file (required! If link is blocked remove the http and www parts):

    dropbox.com/s/763oubjzhdpidoj/PAUSED%20%2B%20CHECKBOX.capx

    Steps to reproduce:

    1. press P to pause.press P to un pause

    2. press P to pause.click the checkbox,press P to un pause

    3.

    Observed result:

    it gets stuck

    Expected result:

    to un-pause

    Browsers affected:

    Chrome: yes

    Operating system & service pack:

    window 8 64 bit,windows xp

    Construct 2 version:

        r160

Roccinio's avatar

Roccinio

Member since 3 Oct, 2013

None one is following Roccinio yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies