answersLogoWhite

0


Best Answer

Depends on what type of attack you are trying to achieve, you did not provide enough information. but ill try to help anyways.

for a platform game, if by attack you mean shoot, then simply make an object that you want to use as a bullet, and then for the keypress event for shooting, simply add a code which creates an object, gets its ID, then sets the speed in the desired direction. example:

B=instance_create(x,y,obj_bullet); //create a bullet and save its ID in the variable 'B'

B.direction=direction; //the direction we want the bullet to go.

B.speed=12; //make the bullet move with the speed of 12

now simply add collision events within the bullet object, and lets say, for example, it hits an enemy, you would either destroy the enemy, or subtract lives from it.

for this example, lets say your enemy has a variable called "hp" which is how many lives it has. Now whenever it is hit by a bullet, it will lose 5 lives, and if its lives go below zero, or equal zero, it is destroyed.

First, we want to give the enemy lives, so in the create event we will add this piece of code:

hp=20; // the amount of lives the enemy has

then in the collision event we simply subtract 5 hitpoints, and destroy the bullet so we dont lose lives again.

hp-=5; //subtract 5 hp

/*destroy the bullet. in collision events, the object that collides ID is saved into the variable "other" so we can use that for things like destroying it, reading data, changing its direction/variables, and pretty much anything else you can think of. */

with(other)

{instance_destroy();}

Hope that helps. you didn't provide enough information, so I cant give you an exact solution.

~grumpymonkey from the GMC

User Avatar

Wiki User

βˆ™ 15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

βˆ™ 14y ago

You might think, that as amazingly useful as Game Maker is, there are no pre-made objects with actions and sprites that are like Dragon Ball Z. So, if you want to make someone melee attack then make sprites of the player's character punching, kicking or something. Then make an event to change the regular Sprite to the fighting one, every time you press a button. To make it even better add health to the enemies, you can find good tutorials online at YouTube.com for health. I am sorry if this answer was confusing.

I hope this information was helpful.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make someone meelee attack in game maker 7?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a video game maker?

someone who makes a video game


Can someone help you with Game Maker 8?

Be more specific.


Who is the game maker?

Sorry, But this area is for game maker questions only, GAME MAKER, As in the PROGRAM GAME MAKER, Not Other Game Makers, Game maker is owned by yoyo games, So please dont post questions about other game makers here, but, to answer your question, game maker is the best game maker, just search yoyogames game maker in Google UK.


What is the 3d game maker password?

It costs 20$ and to have someone give you the code is ILLEGAL.


Can you transfer a game from game maker to game maker studio?

yes


What is game maker 7 pro activation code?

The Game Maker 7 Pro activation code allows you to upgrade from Game Maker 7 Lite to Game Maker 7 Pro.


What is an animated walkthrough?

well, what I think an annimated walkthrough is, and probaly is at that, a video of the game being played as the maker of the video (or someone the maker has entrusted with the job) saying what to do on the missions.


What is a good video game maker for a beginner?

Game maker from yoyogames.


Can you get Game Maker without downloading?

If your talking about the game maker at "yoyogames.com", then no.


What is the game maker serial number?

its a different code for every purchase, and once the code is used, that number expires. so unless you purchase game maker(or someone else does) you cannot use the same number twice.


Where can you get game maker 7pro?

Game Maker 7 Pro can be bought for about 20 US dollars at the official Game Maker website (www.yoyogames.com)


What is the best website I can submit your game maker game?

http://www.yoyogames.com/yoyo games is the most suitable game shareing website for game maker as they are the owners of the game maker brand.