Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Side view battle system

Status
Not open for further replies.

Kaoii

Member

After my characters attack monsters, they return to their former spots way too fast. Is there any way to slow this down?
 

rye.jp

Member

Q.

After my characters attack monsters, they return to their former spots way too fast. Is there any way to slow this down?

A.

It is the part the 210th line.

"Normal Attack" => [

"main phase step 3",
"Hero Graphic Change#WALK_L",
"Hero Move#target,32,0,64,0",
"Hero Graphic Change#NORMAL",
"Waiting#5",
"Hero Graphic Change#ATTACK",
"Throw Animation",
"main phase step 4",
"Hero Graphic Change#WALK_L",
"Play Sound Effect#016-Jump02,80,100",
"Hero Move#self,0,0,48,5",
"end"
],

Battler's movement has been decided by the code of this original script.

"Hero Move#self,0,0,48,5", Here is a return part.

48 is a speed.
When here is adjusted to a small value, movement is slow.

Example

"Hero Move#self,0,0,24,5",

By the way,

" self " is movement target. Additionally, there is " target ", "party" etc.

first â€Â
 
hey rye is there anyway to make it so enemies use charsets and walk up to the heroes and attack or attack from a distance if its a ranged weapon?
 

Kaoii

Member

I appreciate you answering my question rye, it helps out a lot. I have another.

I have my character zoom set to 1.3, my party X value set to 480, and my party Y value set to 150. When that happens, the command window with the options such as Attack goes to the far left.

Attached to this post is a screenshot of what I'm talking about. How do I fix this?
 

rye.jp

Member

Hi Kaoii

Is KGC ACTIVE COUNT BATTLE SCRIPT used?

If it is so, the correction is easy.

Please change

# アクターコマンドウィンドウの位置を設定
@actor_command_window.x =
[@active_battler.battle_status_x - 80,
640 - @actor_command_window.width].min

from the 2002nd line. The line is a version not translated.

# アクターコマンドウィンドウの位置を設定
@actor_command_window.x = 80

It is good that it is not 80 of the numerical values either.
 

rye.jp

Member

Kaoii;134505 said:
Nope, I'm using RTAB.

sorry. It thought so because it was a script of KGC and it was ahead the same
question.

command_window position is not remodeled in my script.

Please retrieve "@actor_command_window.x =" pushing Ctrl+Ahift+F.

I think that it reconciles if the value substituted for "@actor_command_window.
x =" is changed.
 

Kaoii

Member

My mistake rye, you're right that your script has nothing to do with the X and Y coordinates of the command window.. which leads me to my next question =p

The battle system I was using before yours (which is attached to this post as system.txt) had it to where the command window would appear beside each of the characters.

Is it possible to continue doing this with your battle system? I don't have enough scripting knowledge to be able to get by on this.
 
Umm for some reason when i just post it in a new thing above main, I get an error message saying right when I enter battle:

Script 'Enemy_HP' line 152: NoMethodError occurred
undefined method 'contents_opacity=' for nil:NilClass

Why does it do this and what does it mean?
 

rye.jp

Member

Maybe, I think it is good in this.

module SDVA
PARTY_POS = 1
end

class Scene_Battle
#--------------------------------------------------------------------------
# ? ????????????????????
#--------------------------------------------------------------------------
alias phase3_setup__window_sdva phase3_setup_command_window
def phase3_setup_command_window
phase3_setup_command_window_sdva
if SDVA::WINDOWPOS_CHANGE
# ???????????????????
case SDVA::PARTY_POS
when 0
x_pos = @active_battler.base_x - (@actor_command_window.width/2)
y_pos = @active_battler.base_y
when 1
x_pos = @active_battler.base_x - @actor_command_window.width - 16
y_pos = @active_battler.base_y - @actor_command_window.height
when 2
x_pos = @active_battler.base_x + 16
y_pos = @active_battler.base_y - @actor_command_window.height
when 3
x_pos = @active_battler.base_x - (@actor_command_window.width/2)
y_pos = @active_battler.base_y - @actor_command_window.height - 48
end
@actor_command_window.x = x_pos >= 0 ? x_pos : 0
@actor_command_window.x = x_pos+@actor_command_window.width <= 640 ? x_pos : 640-@actor_command_window.width
@actor_command_window.y = y_pos >= 0 ? y_pos : 0
@actor_command_window.y = y_pos+@actor_command_window.height <= 480 ? y_pos : 480-@actor_command_window.height
# ??????????????????
@actor_command_window.z = 9999
end
end



if Using RTAB


module SDVA
PARTY_POS = 1
end

class Scene_Battle
#--------------------------------------------------------------------------
# ? ????????????????????
#--------------------------------------------------------------------------
alias phase3_setup__window_sdva phase3_setup_command_window
def phase3_setup_command_window
phase3_setup_command_window_sdva
if SDVA::WINDOWPOS_CHANGE
# ???????????????????
case SDVA::PARTY_POS
when 0
x_pos = @active_actor.base_x - (@actor_command_window.width/2)
y_pos = @active_actor.base_y
when 1
x_pos = @active_actor.base_x - @actor_command_window.width - 16
y_pos = @active_actor.base_y - @actor_command_window.height
when 2
x_pos = @active_actor.base_x + 16
y_pos = @active_actor.base_y - @actor_command_window.height
when 3
x_pos = @active_actor.base_x - (@actor_command_window.width/2)
y_pos = @active_actor.base_y - @actor_command_window.height - 48
end
@actor_command_window.x = x_pos >= 0 ? x_pos : 0
@actor_command_window.x = x_pos+@actor_command_window.width <= 640 ? x_pos : 640-@actor_command_window.width
@actor_command_window.y = y_pos >= 0 ? y_pos : 0
@actor_command_window.y = y_pos+@actor_command_window.height <= 480 ? y_pos : 480-@actor_command_window.height
# ??????????????????
@actor_command_window.z = 9999
end
end
 

rye.jp

Member

Nightmare Omnizohar;134699 said:
Anyone knows how to make the enemy walk up to the hero like how the hero attacks the enemy?


354th Line in my script

return BattleActions::Actions["Enemy Attack"] # default

Please change!

return BattleActions::Actions["Normal Attack"] # default
 

rye.jp

Member

whiteshadow;135472 said:
Umm for some reason when i just post it in a new thing above main, I get an error message saying right when I enter battle:

Script 'Enemy_HP' line 152: NoMethodError occurred
undefined method 'contents_opacity=' for nil:NilClass

Why does it do this and what does it mean?

i dont know "Enemy_HP" script.
who made it?
and Where is it?

If it is not understood, your question is not answered to me.
 

Kaoii

Member

rye, that isnt exactly what i'm asking =p

what i'm wanting to know is if i can position the command windows using your script similar to the way the command windows were positioned in the other script.
 

rye.jp

Member

Kaoii;135952 said:
rye, that isnt exactly what i'm asking =p

what i'm wanting to know is if i can position the command windows using your script similar to the way the command windows were positioned in the other script.

Please change "screen_x" and "screen_y" to "base_x" and "base_y".

I am embarrassed because I do not so understand English. ':|
 
Don't be embarrassed Rye, you've brought an amazing script to a group of people who don't speak your language. And...you're still providing support. We'll just have to be patient.

Keep up the good work! :yes:

Rytheon
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top