LittleStain's Recent Forum Activity

  • instead of the second event

    put the flashlighton = 0 as a subevent and

    use the system else condition.

  • Why not give the orcs the built in line of sight behaviour and move the orc with a movement behaviour?

    for each orc

    orc has line of sight to player

    system compare two values: distance(orc.x, orc.y, player.x, player.y)<200

    -orc set orc.seesplayer : orc.seesplayer+1

    -orc set bullet angle : angle(orc.x, orc.y, player.x, player.y)

    orc has not line of sight to player

    -orc set orc.seesplayer : orc.seesplayer-1

    for each orc - orc set bullet speed: orc.seesplayer/10

    set the bullet behaviour to bounce of solid and there you go!

  • Have you tried switching the physics engine?

    There are 3 possibilities, box2dweb, box2d asdm.js, cocoonjs native.

    You seem to be talking about Ludei, so I guess you should use cocoonjs native.

  • lerp isn't a behaviour, it's an expression you can use.

    create an object and use this:

    every tick - object set x : lerp(object.x,1000,0.1)

    to see the effect.

  • I'm not sure objectnames would work as expected.

    Strings and numbers work great.

  • Could you use families for this?

    so put the spplayerpiece in a family called spfamily.

    and check for each spplayerpiece if they have line of sight to the family.

    I know it works in other cases to compare instances with eachother, maybe it will work here too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It should be possible although Construct2 was not made specifically for that purpose. It would be a lot like creating a cutscene.

    you could compare the frame and set the spritesize accordingly.

    to sunchronize the sound you should have it triggered at the right time, or trigger the events at the right time according to the sound.

  • Containers might not be necessary, but learning about them in an easy game is better than not knowing about them when trying to create something harder.

    When working with a hitbox and seperate sprite for the enemy it is easier when the sprite and hitbox are "connected" so when you destroy or hit one the other one is automatically "linked", it makes the picking part, which many construct2 users confused, a little easier.

    Here's the manual entry on containers

    If you put the enemy sprite and the hitbox together in a container, when you say on collision with hitbox, enemy play death animation, only the "linked" enemy will play that animation.

  • One way to do it:

    for each enemy

    system compare two values: distance(enemy.x, enemy.y, player.x, player.y)<50

    • enemy set speed to 0

    system compare two values: distance(enemy.x, enemy.y, player.x, player.y)>50

    • enemy set speed to 10

    ofcourse you should play with the values

  • system create sprite.

    It would probably be easier to give you a better answer if you asked a better question.

    Could you explain what you would like to do and why it isn't working?

  • yes.

  • If you put the enemy and the hitbox to a container, this could solve everything.

    another option is to pick the right enemy sprite in the event, so the action is not called on all instances of the enemy sprite.

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies