RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
COMMON EVENT VS ZTBS+AVI PLAYER

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 83
Hello world!

I am mixing a lot of scripts with luck and it´s working perfectly.

But, i really need your help with:
 
ZTBS---> Tactical Battle system
Avi player Script --> To play Videos.

My problem is when i am in a tactical battle, I want to play a short clip instead of animations casting skills only. It is possible like this:

#==============================================================================
# Zenith Tactical Battle System
# Skill Range
#------------------------------------------------------------------------------
# This scene defines skill range, such as distance, size etc
#==============================================================================

module RPG
class Skill
def range
case @id
#==============================================================================
# ??Add your skills below to make them fully defined in battle??
#==============================================================================
#------------------------------------------------------------------------------
# when Skill ID
# targetarea = [direction, range, enemy passibility, long range]
# cursor = [direction, range, enemy passibility, selected cursor]
#------------------------------------------------------------------------------
#
# Set Up
#
# Direction
# 0 : . Shape
# 1 : + Shape
# 2 : Filled ? Shape
# 3 : Surround ? Shape
#
# Range
# 0 = Square your characters on
# 1 = 1 more onto 0
# 2 = 1 more onto 1
# 3 = 1 more onto 2
# Etc etc
#
# Enemy Passibility
# true : The Skill Can Pass Through The Enemny
# false : The Skill Cannot Pass Through The Enemy
#
# Long Range
# true : Stops you from using the spell on people right next to you
# false : Allows you to use spells next to you
#
# Enemy Passibility (Only activated if the target are one is)
# Note: This really doesn't matter at all aslong aas you set it for the
# target area Enemy Passibility
#
# true : As above
# false : As above
#
# Selected Cursor
# true : This will make it so that the main cursor has to be selected on
# a character to use the spell rather then its range.
#
# false : This makes sure that the spell can be used by the cursors range
# instead of having to put the main cursor on a character to use.
#
#==============================================================================
# Define your spells, just use the format above to define your spells
#==============================================================================

when 1 # When Skill ID 1
targetarea = [0, 3, true, false]
sleep(10)
$game_switches[1579] = true <------------------ HERE I AM CALLING A COMMON EVENT AUTOMATIC
CALLING ANOTHER SCRIPT ( MOVIE PLAYER )
when 3 # When Skill ID 1
targetarea = [3, 3, true, false]

when 7 # When Skill ID 7
targetarea = [0, 3, true, false]
cursor = [0, 1, false, false]

when 6 # When Skill ID 6
targetarea = [0, 5, true, false]

when 16 # When Skill ID 16
targetarea = [0, 3, true, false]
cursor = [0, 1, false, false]

when 57 # When Skill ID 57
targetarea = [1, 2, false, false]
cursor = [1, 1, false, true]

when 73 # When Skill ID 73
targetarea = [0, 4, true, true]

#==============================================================================
# If not defined, use as default
#==============================================================================
end
targetarea = [0, 1, false, false] if targetarea == nil
cursor = [0, 0, true, true] if cursor == nil
return [targetarea, cursor]
end
end
end
--------------------------------------------------------------------------------------------------------------------------------------

BUT the video is called on a common event and i have no idea why is playing two times
I only want to know to modify the script to put the clip only once when i have called my skills.

I hope you can understand me

thanks in advance see you.







*
Rep: +0/-0Level 83
Hey I have found the solution:

If you like to put video (avi or flash) when casting skills or items you only need to edit the skill or item and associate a common event in Database.

Then edit the common event called with:

$flash.play("pirate.swf", 1)  <-- this is flash player script for example. Dark_Wolf_Warrior/Dahrkael ---> By.
the common event must be "nothing"

After using the skill in battle you can watch "pirate.swf"

My problem was that I have ZTBS battle system and was unable to activate those common events after using skills.

NOW THANKS TO GUBID: Awrad winner of scripting contest recently, and creator of Gubid tactical battle system. WE can Fix this issue in ztbs.

We only need to put a small script below ZTBS:

CREDITS TO GUBID.

class Scene_Map
  alias make_skill_action_res_ztbs_common_event_fix make_skill_action_result
  def make_skill_action_result
    make_skill_action_res_ztbs_common_event_fix
    if @skill.common_event_id > 0
      $game_temp.common_event_id = @skill.common_event_id
    end
  end
 
  alias make_item_action_res_ztbs_commmon_event_fix make_item_action_result
  def make_item_action_result
    make_item_action_res_ztbs_commmon_event_fix
    if @item.common_event_id > 0
      $game_temp.common_event_id = @item.common_event_id
    end
  end
end

 ---------------------------------------------------------------------------------

I hope someone is looking for put Video instead of Animations and look for this on google for example.

THANKS TO ALL and gubid. Bye.