I really is problem boy... :p

Hello everyone! :slight_smile: I have problem here…
How to…:

  • let camera follow character(player)?
  • just pressed forward key & use mouse let player to rotate(like other shooter game’s default control)?(Er~ How to say that… How resolve this mean… Sorry I don’t know how to call that. :frowning: )
  • make wave mode? (Wave 1(Have 10 zombie), Wave 2(Have 15 zombie)…)
  • make player & zombie’s health? (Player: 100 Health, Zombie: 80 Health)
  • make damage? (Player with pistol hit zombie 20 damage…)
  • make ammo? (Assault Rifle 30/180, Shotgun 8/48…)
  • make can’t fire when reloading?

Sorry… I have many problem… really…this just a some question in my project… :frowning:

Use the “Center the camera on an object” action (category “layers and cameras”)

I don’t really understand hat you mean. If you try to rotate the player towards the mouse cursor while moving you could use “rotate towards position” with the mouse position as parameters (for example “MouseX(”",0)", “MouseY(”",0)")

Create an external layout for each enemy wave and drop them on the scene with the “create objects from external layout” action when needed (in combination with a timer for example)

Give the objects (player/enemy) a hitpoint variable. For displaying the hitpoints on the object either use a textobject and place it slightly above their heads (the easy way) or generate a healthbar textures with available healthlevels (for example one heart, two hearts, 3 hearts, etc.), create an animation with just this one frame and show the appropriate animation depending on the value of the health variable (the more complex way).

If bullet is in collision with enemy then remove 20 from the hitpoints variable of enemy. and destroy the bullet object.

Just use a variable for each ammo type + a variable for used weapon. Then compare the weapon with the corresponding ammo type before you shoot.

After you shoot a bullet start a timer and only allow to shoot again if the timer has triggered.

Better post thouse questions in the “help with games creation” section of the forum. I don’t think many people will read the open topic section here.

EDIT: Oh, I didn’t notice I have been ninja’d :unamused: … Anyway I leave my response:

First the first, I recommend you to follow the beginners tutorial (if you didn’t already): Beginners tutorial
And: Beginners platformer

Now I list the common solutions for your problems:

  • There is an action to make the camera follow the player (and follow the player with limits) at “Layers and cameras >> Center the camera on an object”, just launch this action every frame (always):

Conditions: No conditions (always) Actions: Center camera on Player

  • To rotate the player with the keyboard use the condition of key pressed at “Keyboard >> Key pressed” and the action to modify the object’s angle at “All the objects >> Angle >> Angle”:

Conditions: Left key is pressed Actions: Do -= 20 * TimeDelta() to the Player's angle

  • To rotate the player around the cursor, just rotate it toward a position with the action “All objects >> Angle >> Rotate toward position” and the position = mouse position (MouseX() and MouseY() return the cursor position in the base layer and camera 0):

Conditions: No conditions (always) Actions: Rotate Player towards MouseX(); MouseY() at speed 0 deg/s (0 deg/s for automatic rotation)

  • For waves, first of all you’ll need a variable to save the wave number, after a wave is completed (e.g. the number of zombies = 0) create a number of zombies = function of the wave number (e.g. 10 + 5*wave, it will give the values 10, 15, 20, etc.).

  • Object’s (instances actually) health, damage, speed, ammo, etc., are simply object variables, it means every object will have its own variable, and modify it will not modify the other objects variables.
    Then you have to modify those variables in a logic way, for example, when Player’s Bullet collides with Zombie, do - Player.Variable(Damage) to the variable Health of Zombie, and do -1 to the variable Ammo of Player.

  • About the reloading/shooting states: You can use an animation (while animation of Player is different from reloading animation, you can shoot), a timer or variable timer (reset the timer when the player start to reload, and until the timer is not greater than X seconds, you can’t shoot)

Hello Wendigo and Lizard-13, thank you to help me. :smiley: I just start my project a few day, and I very busy on animation. But I finish my project, I will credit you to my game. :slight_smile: