@ninjagamexpert Well I don't know, I need to know the code and functions that you are using. If it is shooting to the right, you need to change it's direction variable in each step event.
thanks man i figured it out .......but what i really need your help with is possibly a tutorial on how to make a object doge bullets and return fire...im trying to make a full on war game with enemy soldiers and friendly soldiers fighting while the main player is in the mix but im stuck on this problem ........it would be much appreciated -THANKS-
i am makin an fps and when i use my radius it always stays by the side of my player obj. i checked all the solid collision stuff but it still stays by the side. any ideas?
JOHN8PIE i have a ? ........lets say it took three or more shots to kill you enemy how would you get blood to splatter each time you bullet made contact with you enemy? THANKS
@51PROBES Just a collision event for the bullet and enemy. In that event, create an instance of blood or just draw it. Should I go more in depth with this and post some code, or do you think you can figure it out?
How do you make the walls? I tried setting horizontal & vertical speed of the player to zero on collision and it doesn't work right, It always faces right and doesn't follow the mouse.
@John8pie The friendly ai are programmed to shoot at and move around, as long as there are enemy's to shoot. So if there are no enemies to shoot.. i get teh message.
I'm going to work on trying to fix it today. I should get it, because so far i've fixed all of the errors i've been getting.
Dude your bullet things are vague and I can't tell what the values are. Also, When my player moves, and the radius hits the enemy, it stops and my tank moves without it. also my enemy hardly turns and only makes bullet on top of itself.
@BionicleStudios347 It acts just like the radius, it should jump to the AI. I might be getting ahead of myself, this may not be in the video tutorial, but each AI should have its own sight
@BlueRazorProductions Make a sprite. Make it be like, 64 by 64 pixels, whatever you want. Have it just be a big circle. Set the origin to the center. hard!=1;
Nice vid but i need to know something, can anyone or John8pie help me?
Ive made an enemy that follows me, but, ive only got one sprite when he moves, so like, his sprite looks like he is walking right, but when he walks left he looks like he's moon walking? The enemy walks around randomly, so how do i make it when he randomly goes left, to make a sprite to make it look like he's going left, e.t.c. I hope u guys get what i mean.
Nice vid but i need to know something, can anyone or John8pie help me?
Ive made an enemy that follows me, but, ive only got one sprite when he moves, so like, his sprite looks like he is walking right, but when he walks left he looks like he's moon walking? The enemy walks around randomly, so how do i make it when he randomly goes left, to make a sprite to make it look like he's going left, e.t.c. I hope u guys get what i mean.
For some reason it is crashing. It says error at object enemy, event create. It is having a problem with shoot = false. It says "at position 7: variable name expected." I'm new to game making, so I don't know what that means let alone how to fix it. I did everything exactly like you, except I wanted to use WASD to move.
Take out the spaces, and you will have to have it be the name of your player's object. So it'll be like PLAYERNAME.x and PLAYERNAME.y Dont use underscore(_)
can u make another video showing exactly what u do so u have to make the objects and put them in to because just clicking the action and saying it doesnt help
btw can u click all the actions instead of saying it.......u really confuzzle me sometimes
Wow! Thanks of tutorial!
I'm find it!
Sorry, i'm russian...
MrSta1ker27 1 month ago
FATAL ERROR in
action number 3
of Create Event
for object Player:
COMPILATION ERROR in code action
Error in code at line 1: global d += direction ^
at position 8: Variable name expected.
HELP!
TheangryGhast 2 months ago
Loud voice!! (FUckin hell!!)
toberius123 2 months ago
Can you make a Notepad document with the Codes used in this Tutorial ??
ParaMathycs 4 months ago
ERROR in
action number 1
of Step Event
for object radus:
Error in expression:trooper.x position 9: Unknown variable x
WTF!!!!! (im new to this stuff so plese help meh)
neosapine 7 months ago
im using gamemaker 8.0 pro so is it the wrong gamemaker
ninjagamexpert 7 months ago
@ninjagamexpert Well I don't know, I need to know the code and functions that you are using. If it is shooting to the right, you need to change it's direction variable in each step event.
John8pie 7 months ago
@John8pie
i fixed the moving thing but the enemys are still shooting out walls and wont move
ninjagamexpert 7 months ago
@John8pie
my enemys are shooting out sights or walls, and my player keeps turning counter-clockwise and wont shoot
help fast
ninjagamexpert 7 months ago
@ninjagamexpert Well I can't really help you with just that information. What code are you using?
John8pie 7 months ago
@ninjagamexpert So I'm making a 2D side scroller, how could I make it change the sprite of the enemy when it changes direction
Biowott 1 month ago
@John8pie
oh thanks dude!
(lol i keep messing up)
ninjagamexpert 7 months ago
This has been flagged as spam show
@John&pie
oh thanks dude!
ninjagamexpert 7 months ago
oh thanks dude!
ninjagamexpert 7 months ago
when i try to play it says :action number 2
of Create Event
for object obj_zombie:
Error in expression:random[90]+90 position 1: Unknown variable random or array index out of bounds.
please help fast
ninjagamexpert 7 months ago
@ninjagamexpert You are using braces after your random function call. Parenthesis are what you need.
random(90)+90
Functions use parenthesis; arrays use braces.
John8pie 7 months ago
@ninjagamexpert i have found your error noticed this: random[90]+90 well replace it with this : random(90)+90
tryzombie505 7 months ago
HELP ME PLEASE!! IT SAYS UNKNOWN VARIABLE X ON THE STEP EVENT OF RADIUS ! WHYYYY
osbysweden 8 months ago
@osbysweden x is a local variable, that is really odd. Try declaring it in the create event 'var x;'
John8pie 8 months ago
hoq do you rotate it without your sprite facing it upside down?
Blizeful 9 months ago
@Blizeful Make sure your sprite is facing the right in the sprite editor.
John8pie 9 months ago
thanks man i figured it out .......but what i really need your help with is possibly a tutorial on how to make a object doge bullets and return fire...im trying to make a full on war game with enemy soldiers and friendly soldiers fighting while the main player is in the mix but im stuck on this problem ........it would be much appreciated -THANKS-
51PROBES 9 months ago
coud you make it in a platform game? jw..
enokmalik 9 months ago
i have a question i am on game maker 8 pro althought the step avoiding action is not there, is there another way to do the required action???
justintime141 9 months ago
@justintime141 Step avoiding is there, its at the bottom on the "Move" tab.
TheKillaFruit 9 months ago
i am makin an fps and when i use my radius it always stays by the side of my player obj. i checked all the solid collision stuff but it still stays by the side. any ideas?
seriousbiskit 9 months ago
@seriousbiskit Are the origins of the radius sprite and player a bit mismatched?
It's a good idea to have them both in the center of each sprite.
John8pie 9 months ago
JOHN8PIE i have a ? ........lets say it took three or more shots to kill you enemy how would you get blood to splatter each time you bullet made contact with you enemy? THANKS
51PROBES 9 months ago
@51PROBES Just a collision event for the bullet and enemy. In that event, create an instance of blood or just draw it. Should I go more in depth with this and post some code, or do you think you can figure it out?
John8pie 9 months ago
It gives me an error
___________________________________________
ERROR in
action number 1
of Step Event
for object rADIUS:
Error in expression:Player.x position 1: Unknown variable Player
andrekid21 9 months ago
@andrekid21 You have to replace 'Player' with the name of your player object.
John8pie 9 months ago
@John8pie Ok thanks m8 you'r the best
andrekid21 9 months ago
How do you make the walls? I tried setting horizontal & vertical speed of the player to zero on collision and it doesn't work right, It always faces right and doesn't follow the mouse.
Kittyinmynose 10 months ago
@Kittyinmynose at 8:01 it looks like I mention you set speed to 0 when the player collides with the wall.
John8pie 10 months ago
Im still trying to find out how to make friendly ai's.
I tried it but everytime somethings wrong.
ClusiveC 10 months ago
@ClusiveC Try to make him do everything like the enemy its just he shoots to an enemy and runs towards them.
MRXkick 10 months ago
@MRXkick I tried that, i must have done something wrong.
ClusiveC 10 months ago
@MRXkick I got it to work today, but now, when we kill everyone, i get an error message. i know how to fix it though.
ClusiveC 10 months ago
@ClusiveC What does the error?
John8pie 10 months ago
@John8pie The friendly ai are programmed to shoot at and move around, as long as there are enemy's to shoot. So if there are no enemies to shoot.. i get teh message.
I'm going to work on trying to fix it today. I should get it, because so far i've fixed all of the errors i've been getting.
ClusiveC 10 months ago
but i wont the enemy run away from my player
36425682 11 months ago
@36425682 "but i wont the enemy run away from my player" I'm sorry, I didn't wuite understand that.
What is it you'd like to happen in your game?
John8pie 11 months ago
@John8pie wont=want
he wants his enemy to run away from the player when the player gets close
xQFxifagodatyaho 10 months ago
uhm, how should i make the enemy bullet? cuz when i tryed to make it, the enemy didnt shoot -.- so could anyone help?
wowmage111 1 year ago
@wowmage111 What do you mean 'make' it? The sprite, the object, what?
John8pie 1 year ago
@John8pie I dont know but i think he meant the code.
Computersoup 1 year ago
@John8pie what properties should i use on the object ''enemy Bullet'' like scripts and shizz
wowmage111 1 year ago
@patrick123900 You're using underscores, kiddo. Underscores are only for the mouse's coordinates.
You want "Player.x" and "Player.y" Obviously, 'Player' should be the name of your player object.
John8pie 1 year ago
can i say that the animation for the player stabbing with his dagger the "bullet" and so whenever i press the button to hit it'll attack?
darlalovly 1 year ago
Help! enemyes are folowing me but not shooting
007cro 1 year ago
@efireman360 make sure it is centered i.e if the sprite is 32x32 set the x/y to 16
gamemakernow 1 year ago
Whenever I begin to play the game, whenever one guy spots me, they all spot me and stop shooting at me? How do I fix it?
Dicinic 1 year ago
@Dicinic oops i meant to say they all START shooting at me at once
Dicinic 1 year ago
@efireman360 Make sure both your players sprite and radius sprite have the origin in the center.
John8pie 1 year ago
Dude your bullet things are vague and I can't tell what the values are. Also, When my player moves, and the radius hits the enemy, it stops and my tank moves without it. also my enemy hardly turns and only makes bullet on top of itself.
NightClawStudios 1 year ago
Thanks very much really helped!
GMLscript 1 year ago
@gamerguy2217 because when they shoot your life goes -1 if u have that in an action put relative on
KnightOfSka 1 year ago
how do i do if i want it to follow the mouse instead of player?
MrFredde9999 1 year ago
@MrFredde9999 In the move_towards_point(...) code, change it to
move_towards_point(mouse_x,mouse_y,motion);
John8pie 1 year ago
WTH DO YOU MEAN "AND ALL THAT I CANT SEE THE VALUES ON HALF OF THEM"
RabaShibaRabaSha 1 year ago
Comment removed
RabaShibaRabaSha 1 year ago
@BionicleStudios347 It acts just like the radius, it should jump to the AI. I might be getting ahead of myself, this may not be in the video tutorial, but each AI should have its own sight
John8pie 1 year ago
@BionicleStudios347 The origin of the radius sprite should be the center. Same with your player.
You must've missed something, then.
Sight is what is going to control whether the enemy will 'see' you, and then decide to follow or attack.
John8pie 1 year ago
@BionicleStudios347 This was 7, at the time the video was created.
John8pie 1 year ago
@BionicleStudios347 Nope! All of my videos have Lite edition coding, unless I state in the video.
John8pie 1 year ago
how do i make the radius bigger!
BlueRazorProductions 1 year ago
@BlueRazorProductions Simply make a big radius sprite.
John8pie 1 year ago
@John8pie HOW?
BlueRazorProductions 1 year ago
@BlueRazorProductions Make a sprite. Make it be like, 64 by 64 pixels, whatever you want. Have it just be a big circle. Set the origin to the center. hard!=1;
John8pie 1 year ago
@gamerguy2217
Tell me about the error message, or post it here.
John8pie 1 year ago
I have a over head playing game, All I want is to make the enemy object move at the player, may some one help me?
IRNatman 1 year ago
This has been flagged as spam show
Nice vid but i need to know something, can anyone or John8pie help me?
Ive made an enemy that follows me, but, ive only got one sprite when he moves, so like, his sprite looks like he is walking right, but when he walks left he looks like he's moon walking? The enemy walks around randomly, so how do i make it when he randomly goes left, to make a sprite to make it look like he's going left, e.t.c. I hope u guys get what i mean.
MrBlueFlames 1 year ago
Nice vid but i need to know something, can anyone or John8pie help me?
Ive made an enemy that follows me, but, ive only got one sprite when he moves, so like, his sprite looks like he is walking right, but when he walks left he looks like he's moon walking? The enemy walks around randomly, so how do i make it when he randomly goes left, to make a sprite to make it look like he's going left, e.t.c. I hope u guys get what i mean.
MrBlueFlames 1 year ago
@MrBlueFlames If you don't have it in all directions like I do in the video, you could simply test the direction. Like,
if direction=0 { sprite_index=PlayerLeft }
John8pie 1 year ago
I fixed the radius problem but now i need to know how to make the enemies shoot slower.
AlmighyDove 1 year ago
Ok, i got mostly everything, but just one problem:
Why is it that my "radius" is attached to me instead of me being inside it? It's hard to explain what's going on and that's the best I can do.
AlmighyDove 1 year ago
@AlmighyDove
Yeah, sorry, I don't think I can help with that explanation...
John8pie 1 year ago
@AlmighyDove Rereading the scenario, I'm thinking your radius's sprite origin is not in the center, like it should be.
John8pie 1 year ago
@John8pie yeah i spent about 30 mins toying around with gm until i found that out. thanks though
AlmighyDove 1 year ago
For some reason it is crashing. It says error at object enemy, event create. It is having a problem with shoot = false. It says "at position 7: variable name expected." I'm new to game making, so I don't know what that means let alone how to fix it. I did everything exactly like you, except I wanted to use WASD to move.
AmericanRiot571 1 year ago
@AmericanRiot571 haha nevermind. I figured it out. I had a sound for shooting I named shoot, so the game got confoozled.
AmericanRiot571 1 year ago
awesome thanks
ShyguyFable 1 year ago
nice tutorial^^ gj
KnockUrBack 1 year ago
how u make radius
Inatje 1 year ago
@Inatje
How do u make radius? Sprite or object?
Sprite is just a basic circle, object just follows the player
John8pie 1 year ago
@John8pie but wen it comes in the raidius it dont follow me or shoot
Inatje 1 year ago
1:29 - Can't you just do this in the code?
direction-=random(360)
That's simpler ^^
XtremeGamer20 1 year ago
did every thing u did but AI didn't shoot // scratch that it works
14Zacman 1 year ago
did every thing u did but AI didn't shoot
14Zacman 1 year ago
it comes up with an error and it doesnt know what player _x and player _y are any help?ps i have game maker 8 lite does that make a difference
RWD130 2 years ago
@RWD130
it shouldn't.........
galen1surion 2 years ago
Take out the spaces, and you will have to have it be the name of your player's object. So it'll be like PLAYERNAME.x and PLAYERNAME.y Dont use underscore(_)
John8pie 1 year ago
Rofl, I just realized I set Alarm 2 to 30 and we dont even end up using Alarm 2. I'm pathetic.
John8pie 2 years ago
good video.. maybe help alot of people
Q3o5 2 years ago
Can you send me this tutorial file as gmk.?
VidyogazeR 2 years ago
Sorry, I no longer have it
John8pie 1 year ago
btw is there a way to have random and not have it so theres a possibility of numbers behind a decimal
thewhulk 2 years ago
Yes, you use the floor code. I believe you put it before the number.
John8pie 1 year ago
the only thing i can say to improve this is create a "radius" around the enemy facing "Direction"
Add Event contact with "player" event : create bullet relative ect. so the enemy cant spot you when your behind them
thewhulk 2 years ago
very good tuts mate love them really helped ! :)
Hunter1428 2 years ago
Cool coding...looks really cool...BUT the drawing...OH NO...so bad as my english...sorry,it´s so...but you know what you do...really nice.
Kriegsfabrik 2 years ago
Okay, sounds good. Let m,e know how it goes as soon as you can~
John8pie 2 years ago
can u make another video showing exactly what u do so u have to make the objects and put them in to because just clicking the action and saying it doesnt help
btw can u click all the actions instead of saying it.......u really confuzzle me sometimes
s02041996 1 year ago
Have you gotten a chance to try it out yet? What do you think? :D
John8pie 2 years ago