Lunatrap's Recent Forum Activity

  • MMM maybe add a instance variable... so when a sprite touches one of the nodes it will add 1 to such variable

    and then have like this

    if instance viriable=0

    move to node 1

    when it reaches the node

    add +1 to instance viriable

    if instance viriable=1

    move to node 2

    when it reaches the node

    add +1 to instance viriable

    if instance viriable=2

    move to node 3

    when it reaches the node

    add +1 to instance viriable

    and on and on

    try chaning the pathfinding behaviour to "ignore diagonals"??

    this is a very shallow idea... but if you dont find any answers try it

  • WHAT DO YOU MEAN GAME CENTER??

  • Lunatrap

    thank you!

    after dismantling your brain child (i hope you don't mind!) i figured out for future reference that by default it faces right (o degrees ) from the origin point.so if i want to have left and right detection i should add another square on top of the first one and make its angle 180.

    if you are a boy i owe you a beer if you are a girl a glass of wine and some flowers!

    here CHECK IT OUT n.n

    now the 2 enemies have 2 "cameras" or "eyes" if you will

    and you can change the angle in any direction and the LOS will change aswell (angle of the sprite = angle of the LOS cone of view) if you want the cone of view to be 180 just adjust it in the properties

    btw sorry if my english is not good im not from a country that speaks english

  • Lunatrap

    thank you!

    after dismantling your brain child (i hope you don't mind!) i figured out for future reference that by default it faces right (o degrees ) from the origin point.so if i want to have left and right detection i should add another square on top of the first one and make its angle 180.

    if you are a boy i owe you a beer if you are a girl a glass of wine and some flowers!

    im a girl, and thanks

    you dont have to put 2 squares... with one is enouhg... look ill be back

  • here!! see if that wworks for you!!!

    if none of the enemies are looking at you you will be red

    if any of them are looking at you you will be green...

    take oin considerection that the distance is 300px wich means that if you go to the righ side... none of the 2 will see you ebcuase you are more than 300px far so they dont see you... the cone of view is 90 for both... you can change it

    test it and tell me if you find anything worng

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Lunatrap

    thank you for you reply but i have a few questions still unanswered and maybe someone could join the conversation and help.

    since it changes angle (los) according to the objects angle it makes perfect sense for a top down shooter like the example in c2.

    but if you have platform behavior in your square where is the los pointing at (180) during first utilization ?

    up,down,left or right?

    your idea of 2 or even three squares rotating depending on where my other square is going (left or right) so i can have front and rear 180 detection will work (although i believe that there should be a better engine implementation) but if i do not know where it is pointing how can i know how many degrees to rotate for left and right my extra (lol) dummy squares?

    i used LOS on platform games... i only make parform games... so everything i tell you i have tested it in a platform eviorement

    the LOS angle will be the same as the sprite wich has it... let me make you a .capx ill be back

  • I know this is prertty basic <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz"> but i wanted to put this in case someone needs it...

    this is a little .Capx showing how you can make an enemy point in your direction with the angle(x1,y1,x2,y2) expression... its pretty simple... i think i did a good job at picking correctly here...

    using this you can have an archer(rifleman, sniper, etc) with 7 animation to point to the player... and then

    1. put an invisible turret pinned to the archer to fire at the player projectiles.

    2. set the angle of motion of the bullets at the exact agle the archer is looking depending of the angle he is looking (depending of wich animation is on)

    i dont know if this requires high cpu proccesing...let me know guys... what do you think?? any expert can tell me if this is a high cpu way of doing this?? or not... thanks <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    CAPX:

    https://www.dropbox.com/s/80hsm7soafuw6 ... rcher.capx

  • wiht out a .capx its very hard to know what kind of problem you might have...

  • is the "bush" sprite a global instance?? check if the you dont have it as "global"

    another way around is to destroy every copy of the bush when layout 2 starts...

  • if i remember correctly the LOS cone will change if you change the angle of the sprite... so if you mirror the sprite the cone of view will mirror too... another fix is to have 2 sprites... the actual sprite of the enemy... ans another one...a small one make it invisible and pin it to the enemy sprite... and have the LOS behaviour on the little sprite... so you can rotate the angle of the sprite and therefore the line of sight cone wihtout affecting the enemy sprite

  • sorry sorry

  • Hi! i have a question

    i including a fullscreen scaling toggle button in my game...

    i took a look at the example in C2 and i added a way to toogle it on runtime... and i noted that it worked... fullscreen scaling can be toggle high/low on runtime... taking this in consideration i added this to my game... but for some reason i dont see any difference, unlike the example wich i can see the difference... i was looking for a way to get an expression to know if scaling was high or low.. so i can know why i cant see any difference... my game is running a 1080p i dont know if this has something to do with my problem... is there a way to know if the fullscreen scaling is high or low during runtime?? thanks!!!

Lunatrap's avatar

Lunatrap

Member since 12 Jul, 2013

None one is following Lunatrap yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies