Gabriel Goyard's Forum Posts

  • 13 posts
  • That's what i wanted thanks a lot!

  • Hello, I am making a top-down shooter where there is a soldier and a custom cursor. I made a code so that the screen focuses on both, but more on the soldier:

    Camera => Set scroll to disabled

    Every tick: Camera => Set Position to Soldier.X, Soldier.Y

    Every tick: System => Scroll to X: lerp(Camera.X, Cursor.X, 0.3), Y: lerp(Camera.Y, Cursor.Y, 0.3)

    But that goes against this code:

    Camera => Set scroll to enabled

    If Function "Shoot" is Called => Call Function "ScreenShake"

    If Function "ScreenShake" is Called => Camera => Shake

    How could I combine the lerp code and the screenshake one?

  • But is there any way to make in sort of that the recoil value doesn't take any crazy numbers?

  • No problem, I made a bullet spread instead, but still used your code to make a visual recoil on my guns. Thanks bud!

  • Thanks! Is it possible to do the same thing but vertically for a bullet spread? Like with a random recoil value that gets higher if you hold the click?

  • In my game there are 2 teams (Dark and Light) and 2 classes (Assault and Support). I made 4 characters, each of which are related to those parameters (Dark_Assault_Soldier, Dark_Support_Solider, Light_Assault_Soldier, Light_Support_Soldier). In the loadout menu you can choose your team and your class,

    first you have to click either on the Light team or the Dark team, defining the "Team" value either as "Light_" or "Dark_", then same thing for the class ("Assault_" and "Support_").

    Is it possible, instead of directly selecting an object in the event menu, to make select a

    Team + Class + "Soldier" object?

    For example, I wonder if I can I make this:

    Every Tick => set Gun position to Team+Class+"Soldier" object

    Instead of making

    If Team="Light"

    ___If class="Assault" => Set gun position to Light_Assault_Soldier

    ___If class="Support"=> Set gun position to Light_Support_Soldier

    and etc... (it risks to be harder since I also plan to make the player choose between 4 guns and have a multiplayer mode...)

  • I'll try it thanks bud!

  • How could I use the container?

  • Hello, I am currently making a top-down shooter game (planning to be in multiplayer). In this game, there are 4 weapons, 2 classes (Assault and Heavy), and 2 teams (Light and Dark). I made a loadout menu that let you choose bewteen all those parameters (class, team, weapon). The problem is that it makes too much conditions at time (give you an example below):

    Every tick

    If Weapon=1 => Set Weapon1 angle to Mouse.X, Mouse.Y

    If Team="Light"

    If Class=1 => Set Weapon1 position to Light_Assault__Soldier

    If Class=2 => Set Weapon1 position to Ligh_Heavy_Soldier

    If Team="Dark"

    If Class=1 => Set Weapon1 position to Dark_Assault_Soldier

    If Class=2 => Set Weapon1 position to Dark_Heavy_Soldier

    And it goes for If Weapon=1,2,3,4... Moreover, I'm planning to mirror the soldier if the Mouse.X<Soldier.X

    How do I regroup soldiers into 1 thing and weapons into another thing so that I don't have to write thousands of lines of codes?

  • Hello, I am currently making a platform game where every tick, the gun sets its angle to Mouse.X, Mouse.Y, but how can I make the gun move for recoil if it would go against this code?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So in my game I created health bars. As there are many types of ennemies (warriors, archers, etc...). I created a value called "Stick To" for the health bar. When an ennemy, whose name is "RedWarrior" is created, the value "Stick To" sets to "RedWarrior", so that every tick, the health bar sets its position to "Stick To".X for X and "Stick To".Y for Y. How do I code that in the game?

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Asmodean thanks for your answer!!!!!

  • Hello, I am currently making a strategy game in which you could combine units together to make them bigger.

    For example, if you want to combine 2 units of archers, with one archer in the first unit, and 3 on the other one, you can make them overlap so that it makes a single unit of 4 archers.

    For the moment I only added animations on archers, depending on how many there are in a unit (animation 1 has 1 archer, animation 2 has 2 archers, etc.. and it goes up to 4)

    I added a variable called number, which modifies the animation (if number=1 => play animation 1, if number=2 => play animation 2 , etc...)

    I would like to make this:

    Condition:

    Archer Unit 1 is overlapping Archer Unit 2

    Archer Unit 1 Number + Archer Unit 2 Number < 4

    Action:

    Destroy Archer Unit 1

    Add Archer Unit 1 Number to Archer Unit 2 Number

    How do I compare variables between two same objects?

  • 13 posts