@OwenEaster hey im trying to make an realtime battle system, now what i tried at first is using the place_free() command that argues that when yur close enough plressing space will attack, but i cant seem to get that to work, well mostly because i really knew deeply what that command does, im using an ATKcheck coomand that when youve attacked the enemy it returns as true and tells the enemy t attack back, that works, it should all work well if u can help figue out why it dosent attack or calcute
@Mariorox10 if you're doing an rpg, you'll probably have variables in your character as stats, right? say it's objPlayer1 and you have Dexterity as 25 and Strength at 12, but you want to calculate damage and hit chance based off of that, it's just mathematics to figure it out: not much really to do with programming...
for instance, say if it's 1:1 dex to chance, then it'd be something like such:
if (objPlayer.Dexterity >= random(objPlayer.Dexterity))
@krononomikon for the attack, calculate it in the same way:
if you want 1:1, then make the other thing's hp decrease by the strength number, or in conjuction with a weapon and/or enemy armor. Here's an example of what I mean, but do it however you want:
if (objPlayer.Dexterity >= random(objPlayer.Dexterity))
this is a great tutorial and i appreciate it but how do you make it so diferent enemies can have diferent attacks? Every enemy has the same attack because alarm 0 on object_player
Set the room you were in to persistent, create a destroy event on the obj_enemy and in the main1 tab, drag Different Room to the Actions area, where it says New Room either type in the room name or select the room from the list next to the text box.
it worked, but I made it so when you colide with a standing enemy, you go to battle, and when he gets back in the room, I still 'colliding' with him, so it starts all over
When you collide with the enemy, have the enemy destroy itself, create a destroy even for that enemy and put in it the thing you had in the collision event. When you appar back in the room then the enemy will still be gone...Unless you have some sort of respawn active.
@daniel304kingkong sorry sorry i forgot that there was only one step in enemy but i figured it out it had to do with the create attack or something :)
idk never used it before but i think it has something to do with stopping the events before it (obviously) becasue there are the same amount of stops as there are events after the "else" i confused myself... lol
gr8 tut! needed help with the turns anyway what does the action event do any ways? why not switch turns
tisfatman 2 months ago
uuuh can u give us the character doawnloads?
letsgetpshycho 2 months ago
lol my mom uses this song in her kick boxing class at the gym lol and great tutorial
noshi49 4 months ago 5
@noshi49 are you from sweden?
DawnZonex 1 month ago
i lol'd because when you picked keyboard shift i read it as shit.......
killjoy8917 4 months ago
Hourglass as cursor this is creative!
GameDeath 7 months ago
I can't stop nodding my head to the beat!
littlemangdome 7 months ago
no needs PRO
SasukeSharyngan 7 months ago
@OwenEaster hey im trying to make an realtime battle system, now what i tried at first is using the place_free() command that argues that when yur close enough plressing space will attack, but i cant seem to get that to work, well mostly because i really knew deeply what that command does, im using an ATKcheck coomand that when youve attacked the enemy it returns as true and tells the enemy t attack back, that works, it should all work well if u can help figue out why it dosent attack or calcute
DoubleMGames 8 months ago
Cool PC theme. What is it?
TheBoy7477 9 months ago
with some modifications it worked
ash7844 10 months ago
finally, an RPG tut that ISNT just using backgrounds/tilesets
linkfan770 10 months ago
what about speed variables where the the person with the higher speed attacks first?
ROFLvsWTF 10 months ago
THANK YOU!!!! u helped me a lot
billionaireninja 10 months ago
Awesome! Thanks For this :)
TheRoflcer 10 months ago
enemy no atack...
theelmaty11 11 months ago
how can u make it so there r a chance that attacks miss or a chance that they do a certain amount of damage?
Mariorox10 1 year ago
@Mariorox10 if you're doing an rpg, you'll probably have variables in your character as stats, right? say it's objPlayer1 and you have Dexterity as 25 and Strength at 12, but you want to calculate damage and hit chance based off of that, it's just mathematics to figure it out: not much really to do with programming...
for instance, say if it's 1:1 dex to chance, then it'd be something like such:
if (objPlayer.Dexterity >= random(objPlayer.Dexterity))
{ // attack code here
}
krononomikon 1 year ago
@krononomikon for the attack, calculate it in the same way:
if you want 1:1, then make the other thing's hp decrease by the strength number, or in conjuction with a weapon and/or enemy armor. Here's an example of what I mean, but do it however you want:
if (objPlayer.Dexterity >= random(objPlayer.Dexterity))
{ var atk; atk = objPlayer.Strength + objSword.Power atk -= objEnemy.Armor objEnemy.HP -= atk
}
That's if you have an object for the weapon, but you'd probably have a ds_map or such
krononomikon 1 year ago
@krononomikon whoops, I meant for the if statement this:
if (objPlayer.Dexterity >= random(100))
krononomikon 1 year ago
@krononomikon thanks ill try it!
Mariorox10 1 year ago
thx for this! I'm gonna make a mega-game RPG with many characters from different universes :3
Runermanyoyo 1 year ago
@ultimatetrunks1 it means like your player attacks then waits for the enimie to attack
then is reapeated
roddel80 1 year ago
can you make a video like this but it is turn based
roddel80 1 year ago
What OS is this on?
hylianfreak 1 year ago
WHY THE CRAP DOES EVERYTHING NEED VERSION 8?!??! I HAVE & PRO
Elijahbabyluigifan 1 year ago
ok i figured it out :D
kirbybros130 1 year ago
Comment removed
kirbybros130 1 year ago
maybe some instructions?
hanz00222 1 year ago
i have pro so i dont care :)
firemario10 1 year ago
what are you writing on the draw option?
TSHTSMusic 1 year ago
this helped me very much :)
083downtonc 1 year ago
how do i make it so i can use different things like items?
bowsertheshredder 1 year ago
AWSOME TUTORIAL!!!!
mms1911 1 year ago
idk why but in my create in obj_player to get his health 15 it wont work and its typed perfectly
epicspoofz 1 year ago
what is da sowng
epicspoofz 1 year ago
this is a great tutorial and i appreciate it but how do you make it so diferent enemies can have diferent attacks? Every enemy has the same attack because alarm 0 on object_player
lolcan30 2 years ago
TUNE!!
JDE56565 2 years ago
fank alot mate
Oop984 2 years ago
oh yeah I can't figure out what to change to make the enemy use a different attack!
ninja067 2 years ago
how do you make it when you go to battle with the enemy, when you win you go back to the room you 'found' him in?
ninja067 2 years ago
Set the room you were in to persistent, create a destroy event on the obj_enemy and in the main1 tab, drag Different Room to the Actions area, where it says New Room either type in the room name or select the room from the list next to the text box.
DanteDeshar 2 years ago
it worked, but I made it so when you colide with a standing enemy, you go to battle, and when he gets back in the room, I still 'colliding' with him, so it starts all over
ninja067 2 years ago
When you collide with the enemy, have the enemy destroy itself, create a destroy even for that enemy and put in it the thing you had in the collision event. When you appar back in the room then the enemy will still be gone...Unless you have some sort of respawn active.
DanteDeshar 2 years ago
sweet that'll work thanks man
ninja067 2 years ago
how do you make it so the enemy can have more than one attack?
ninja067 2 years ago
If you still want to know how to make the enemy have more than one attack I have the answer, reply if you want me to explain it
ShoenenJumpLuffy 2 years ago
thanks but i stopped working on the game
ninja067 2 years ago
All right
ShoenenJumpLuffy 2 years ago
@ShoenenJumpLuffy plz explane
elgeo12345 2 years ago
Okay I'll send you the instructions in a PM, I'm working on it right now in Game Maker to get it to work, and when I do I'll send you it.
All of it will be in GML so it's easy to copy and past all you need to do is make events.
I'll PM you when I finish and test it.
ShoenenJumpLuffy 2 years ago
@ShoenenJumpLuffy how can u make it kick like u do :P ?
Diabolist10 1 year ago
Comment removed
kirbybros130 1 year ago
what about using the test chance option? so you can miss..
daniel304kingkong 2 years ago 13
@daniel304kingkong i did that... it made the game better XD
epicspoofz 1 year ago
And you can also test a chance in GML:
chance = floor(random(2))
if chance == 1{
//do stuff
}
else{ exit; }
daniel304kingkong 1 year ago
Comment removed
kirbybros130 1 year ago
@kirbybros130
Depends one what you want to do,
Could possibly go into the step event.
daniel304kingkong 1 year ago
@daniel304kingkong the step event to what? there are two
kirbybros130 1 year ago
@kirbybros130
Just the "Step" event, not Begin or End Step.
daniel304kingkong 1 year ago
@daniel304kingkong "Depends one" do you mean global.enemyhealth smaller than 1?
kirbybros130 1 year ago
@kirbybros130
Typo. I meant Depends on.
Also, I wasn't really expecting that you asked me in what event..
I mean, I watched the tutorial, ages ago.. Just checking if it was a proper tut..
And I only noticed that.. However, this code will happen before damage calculation..
daniel304kingkong 1 year ago
@daniel304kingkong sorry sorry i forgot that there was only one step in enemy but i figured it out it had to do with the create attack or something :)
kirbybros130 1 year ago
@daniel304kingkong
its a good idea except that its a "1 out of" chance so its 50% hit or lower.
Frelakorn 1 year ago
@Frelakorn
You can also change this amount by using stuff like:
chance = floor(random(20)) instead of chance = floor(random(2))
then you will still need
if chance = range(1,5) || if chance = range(12,20)
or if chance = 1 || if chance = 2
etc.
daniel304kingkong 1 year ago
@daniel304kingkong You said "what about using the test chance option? so you can miss.." without "".
I will tell you how floor(random(14-1)) whatever;
Up above code gives a one in fourteen chance of whatever.
Fira777 1 year ago
@Fira777
I know.. I was just saying that he could be using that.
Also, floor(random(14-1)) won't work.
It'd be something like:
lol = floor(random_range(14,1))
and then
if lol == 1{ other.health-=10
}
That'd give you a 1/14 chance.
daniel304kingkong 1 year ago
Comment removed
sarCAsum0 2 years ago
What does exit this event means? Cause you've got it three times... :o
Hereson0 2 years ago
idk never used it before but i think it has something to do with stopping the events before it (obviously) becasue there are the same amount of stops as there are events after the "else" i confused myself... lol
Chokinghazardman 2 years ago
lol, i get ur point :p ty
Hereson0 2 years ago
u rock!
marcmeynet 2 years ago
nice
kooperbro 2 years ago
needs PRO ?
Diabolist10 2 years ago 8
I don't think so.
177Ronaldo717 2 years ago
@177Ronaldo717 whats the song name???
epicspoofz 1 year ago
@Diabolist10 i has pro XD
epicspoofz 1 year ago
@Diabolist10 No it doesnt needs pro it needs advanced mode :D that means no PRO
omarsonic9 1 year ago