Lunatrap's Forum Posts

  • 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

  • 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!!!

  • angle(player.x,player.y,enemy.x,enemy.y)

    thanks for you reaply and that expresion will give me a number?? leet me try thanks a lot!!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys!!! i want to see if you guys can help me

    see the image below please =) i hope it opens for you

    https://www.dropbox.com/s/nl0tum3kr2b2d6m/ArcherAngle.jpg

    see i want to make an archer have 8 directions where to shoot at... with 8 animations... to shoot at the player

    but i dont know how to know the angle beetween the player and the enemy , so if the player is in front to put the animation to frontal, and if the player is at 45 angle to put an animation of the archer pointing up a bit... like in the image... please help

    thanks in advance!!!

  • I want would like a way to put video to make cutscenes :(

  • Can you provide a project that reproduces this issue?

    i figure it out... finally

    the backups folder should not be in the same folder of the project...

    i moved the backups folders to the C2 root and now uts working great :)

  • Oh right yeah sorry, forgot the solution! :P

    If I remember correctly, my backup directory was IN my project folder (so like "C:/User/Username/Documents/My Construct 2 projects/Project/Backup"), so I changed the backup directory to some place outside my Project's folder :D ("C:/User/Username/Documents/Construct 2 Backup/")

    WOW!! just the thing i did right now... and i was testing :) but now that you tell me that it worked. its a joy!!! :D thanks!!!

  • I had same problem a few months back, and the problem was that each backup was saving my project AND past backups, so when you've saved about 50 times, it's backing up 50 of those backups into a new backup, which adds up fast lol

    and what you did to solve it?? :)