ClassicQT's Recent Forum Activity

  • You do not have permission to view this post

  • omg thank you I was looking for hours and I didnt even notice them sitting their and then to answer my question I guess you only need to drag them into one layout then

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am trying to copy the template "demonoire" for item drops and in the template I can not find anything that sets the angle of the items dropped from monsters or anything of the objects dragged in any of the layouts to check off allow angle change to no

    these objects use 8 direction movement and this is the only events I find about movement. So how do they do this cause as of now I had to drag my gems off to the side of the layout and check the box to no for changing angle and I once I have 100 different types of drops this will be impossible to drag all on the side every layout

    am I just missing events somewhere?

  • I made a small mistake, it should be self.a in the last line.

    And of course put the correct animation names instead of "Left", "Right" etc.

    what do you mean self.a in last line?

    It should be anglediff(self.a,359)<45?"up") ? The equation wont let you end it like that it demands another ":" and so forth

  • Are you using Turret behavior just to determine the angle? I'm guessing it won't be good for performance. You can use this expression:

    angle(self.x, self.y, player.x, player.y)

    This will probably be the most efficient way:

    > On every tick: 
    
    Enemy set variable a to angle(self.x, self.y, player.x, player.y)
    
    Enemy set animation to (anglediff(a, 0)<45 ? "Right": anglediff(a, 90)<45 ? "Down": anglediff(a, 180)<45 ? "Left": "Up")
    

    "a" is an instance variable on the enemy sprite.

    I am having trouble figuring out to compare the instance variable, like how do I write this out using events.Line 5 not line 3. Would you have a example of a event sheet using this way ?

  • I have a top down game. I have a base sprite that is the hitbox of my enemy AI then a sprite above that. I do not want the hit box rotating because it will cause problems with player melee animations.

    I have used a 3rd sprite with turret behavior to determine angle every tick and depending on the angle/state is changes the animation. Is there a better way to do this? This will be a horde game so If I am having 100 enemies on the layout there will essentially be 300 plus objects in the scene. Will this start to cause a performance drop ?

    Is this fine or is there a better way ?

  • > > You can check the distance to the players.

    > > distance(bomb.X,bomb.Y,hero.X,hero.Y)

    >

    > This doesnt work becasue if the player is running around surely one of the bombs will not be in range and it will just fall through the floor and if the player keeps on runnning a certain direction then the bombs will then just start falling

    I created an example of how I would use this in a game.

    We can't just throw grenades we need to add conditions that make the attack more real.

    --Each enemy should have a radius of attack and if the player does not approach him he does not see him and does not throw a grenade (you can see on the screen).

    --Each grenade should have a delay before the explosion, after the time has passed it explodes as in the real world.

    --Grenades can't be thrown with absolute precision they must have a spread of accuracy, enemies can't be absolutely accurate like Robin Hood.

    File c3p

    Ah this is what I needed! a timer , i didnt think of that.

    I agree with you on the bomb not being in the perfect position just didnt know how I can have it explode near the player and a timer does it.

  • You can check the distance to the players.

    distance(bomb.X,bomb.Y,hero.X,hero.Y)

    This doesnt work becasue if the player is running around surely one of the bombs will not be in range and it will just fall through the floor and if the player keeps on runnning a certain direction then the bombs will then just start falling

  • Hi, great example of trajectory calculation.

    https://howtoconstructdemos.com/trajectory-calculation-two-methods/

    Thanks this helped a lot. I got the curve going on the bombs now but the issue im having is the best way to make bombs speed stay 0 once they get close to the player to simulate hitting the ground. since this is a top down game there is no ground to make them stop.

  • Hello guys , I have my Ai and I want him throw a gernade at the player and arrive at the players position. depending on the player position the arc of the gernade thrown should be bigger or smaller.

    I can get the gernade to arrive at the players position using the tween behavior but creating a arc is outside my expertise.

    Would anyone know how to create something like this and a little picture to give a example.

  • I am creating a type of kanban board/white board. I have a card in my project that is a HTML object. In my project I need to zoom out and in the project to see everything. When I zoom in or out only the text on the card gets bigger/smaller and not the actual object all together. Would anyone know how to do this ? My code for zooming in and out is below

  • Replace input text with just text makes everything on set. Input text mean to be used one when user type something and not suitable being moving around. That's exactly how I did with my crossword example: dropbox.com/s/2ymk52xp0inxk7k/crossword_alextro.capx

    I need input text object because the user should be able to create a card and on the card they should be able to name it and move the card where ever they want

    edit// okay i figured out what u meant I just added a text object to just display what the input object has and just make the input box invisible, this works. I will just use this going forward and add some sprites to help give it the effect that they are typing into their.

    Also just learned that if I wanted to do this clean and quick i could just use HTML but i dont know so I guess foranyone wanting to create nice clean menu just learn html lol

ClassicQT's avatar

ClassicQT

Member since 30 Oct, 2023

None one is following ClassicQT yet!

Trophy Case

  • 1-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

4/44
How to earn trophies