Simultaneous Player and enemy action

Status
Not open for further replies.

C7A7L7V7I7N

Villager
Member
Joined
Jun 20, 2017
Messages
8
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hey everyone! I'm trying my hand at learning Javascript, as I've been unsucessful finding a plugin for the Battle system I have in mind.

Its a 1v1 Rock-paper-scissors type game. However, damage is dealt using a 6 skills (which deal various multiplier of damage against one another) and I plan to implement a combo-system on top of that at a later date.

A major hurdle I'm facing right now is making the game so that once an attack has been selected: both the player and enemy make their action and deal damage at the same time. I've been messing about with the system scripts for the past few days (trial and error). And have not been successful.

All I've really tried is looking through 'Game_Action.prototype.speed' and altering the values to 0. and looking at some strings/ functions which mention 'action'.
I have a feeling that the RMMV system may be scripted so that if both the Player and enemy's speed is equal: the player goes first.

I'm extremely new to Javascript. Though I have watched A LOT of tutorials, so I'm able to make some educated guesses to what I'm doing...!

Help will be much appreciated!!! ^_^
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
556
Reaction score
794
First Language
English
Primarily Uses
RMMV
Doing things at the exact same time I don't think is possible in MV. You could seperate things into two states. Once the winner is revealed, winner deals damage.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,370
Reaction score
7,678
First Language
German
Primarily Uses
RMMV
The computer can never do two things at the same time unless you have them running on two different cores, and that is extremely difficult.
What is usually done is to pretend things happen at the same time, by waiting with deleting the first result display until long after the second result is displayed.

That however means that you can't complete the first skill sequence until the second one is processed, and that in turn will require a rewrite of the entire way skills are handled.

So while this is not impossible, it is difficult to achieve...
 

C7A7L7V7I7N

Villager
Member
Joined
Jun 20, 2017
Messages
8
Reaction score
1
First Language
English
Primarily Uses
RMMV
Thank you both Kino and Andar for your comments! ^_^

A somewhat work-around to what I'm trying to achieve: I have made all attack 2-turn attacks, meaning states can be applied to each character (before damage is dealt), to enable attacks to deal various damage, based on the opponent's choice! ^.^

Though, I'm facing a billion other problems while scripting! So this won't be my last post! xD

Thanks again! ^_^
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
556
Reaction score
794
First Language
English
Primarily Uses
RMMV
If you need help, I'm around and good luck to you with your script!
 

donldb

Warper
Member
Joined
Jul 8, 2019
Messages
2
Reaction score
0
First Language
Chinese
Primarily Uses
RMMV
I am wondering if there is any update on this problem.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,370
Reaction score
7,678
First Language
German
Primarily Uses
RMMV
I am wondering if there is any update on this problem.
I think you misunderstand the answers, because there is no problem to update, the original description and assumption were technically impossible and the OP was pointed to how to change his approach to one that can work.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,227
First Language
Dutch
Primarily Uses
RMXP

donldb, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


If you have a problem, it's better to start your own topic.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,231
Members
137,607
Latest member
Maddo
Top