Roccinio's Forum Posts

  • 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? :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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

  • rexrainbow

    dropbox.com/s/pn1uzo9049m8ofs/Screenshot%202014-02-06%2016.04.38.png[URL][/URL]

    hi Mr plugin_master!

    i need your help.

    if i click on nothing it pauses and un-pauses.

    if i click on a check-box then it does not un-pause. maybe it has to do with the fact i change a global variable?it is stuck there for ever.

    any ideas? thank you.

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

  • give your player bullet behavior.set it disabled on start

    when enemy on collision with player

    player x<enemy x               then

                                 set player platform behavior disabled

                                 set player bullet enabled

                                 set bullet angle of motion 180

                                 wait x seconds (you decide)

                                   set player platform behavior enabled

                                 set player bullet disabled

    when enemy on collision with player

    player x>enemy x               then

                                 set player platform behavior disabled

                                 set player bullet enabled

                                 set bullet angle of motion 0

                                 wait x seconds (you decide)

                                   set player platform behavior enabled

                                 set player bullet disabled

                                

    this way you can set any speed for the bullet until you are happy with the result

    tip if you want arched hitback then set gravity for bullet to on and go for bullet angle of motion to 240 and 320 !

  • give me some more information so i can try to help you out.why it affects the player as well? how is your enemy moving? with platform behavior? with bullet movement? with what?with simulated key press?

    i did not say to disable the players platform behavior.only the enemy's

    if it is bullet set bullet disabled ---wait --- then enable again

    if you post a .capx maybe i can help more