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.

RMXP Flash Player and Add-ons [Updated:13/5/09]

Dahrkael":4bwcniqg said:
i think you can make it with the default call:
$flash.play(filename, button)
putted in the
command_newgame
and in the
Scene_Load
just before the line
$scene = Scene_Map.new
I thought thats what I should do, but when I tried it, nothing happened. I'll keep trying though, maybe I'm just not doing it right... Thanks.
 

Ark

Member

It is also possible to make the starting point of your game in a blank map and call your intro with an auto event... (that way no scripting is needed)

I have another question though. I tried to use transparent flashes but it makes the background black and I cannot see the map. It would be cool if we could use it that way.

Also, as you mentioned you are open for requests about the script I have some for you:

Flash as Icons
Flash as Battlers
Flash as Panorama
Flash on maps

But my main question is about Transparency. Please Can you Help me?
 

Ark

Member

IM using this script and it works fine up until the point I put some battle scripts into my game.

The only problem is that when I play the flash video, it plays well and ends well, but it does not disposed of.

I have the flash's last frame (or if I set it so I can skip it, then the frame it was skipped at) on my nose and it does not want to get disposed.

I only need a code snippet to be able to dispose of the flash itself if it is possible.

EDIT: for all you who are wondering:
I have the anser to be able to use transparent flash. Make your flash transparetn and change the code in the script

fondo.bitmap.fill_rect(0, 0, 640, 480, Color.new(0,0,0,255))

to

fondo.bitmap.fill_rect(0, 0, 640, 480, Color.new(0,0,0,0))

This way the map you are in can be in the background of your flash enabling you to do some very nice stuff such as weather effects or anything else...
 
Hello! It is working so cool.

I am testing with success mixed with ZTBS "zenith tactical battle system"

But i have no idea how to mend 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
#==============================================================================




Here I will play "pirate.swf" When you choose skill id 1 in tactical battle.
I Think this is not best room for the call script. Maybe its better when the player press Enter selecting the skill id1 But I have no clue how to do that.


when 1 # When Skill ID 1
targetarea = [0, 3, true, false] <--- Shows the skill area...
$flash.play("Pirate.swf", 1)
$game_switches[1579] = true


HERE i call teh script and its working but the video is playing two times.
How can i modify that to play only one time.?

I have no scripting skills so please any help will be great.




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

THANKS IN ADVANCED.
 
HEY guys, i have discover another form to do that easily,,,

calling a common event that reproduces the swf archive when using one skill...

The problem:

ZTBS isn´t calling common event after using skills asociated.

So help me please.
 

dani3

Member

superfanqui":6nidncyw said:
HEY guys, i have discover another form to do that easily,,,

calling a common event that reproduces the swf archive when using one skill...

The problem:

ZTBS isn´t calling common event after using skills asociated.

So help me please.

the problem with common events in battle is that they are executed after the skill. But I think there was a script that fixed that..
 
Dani, you mean there´s a modification for ztbs or what?

thanks for the tip but i haven´t found that script.

Gubid tactical battle system can use common events using skill. i hope he can aid me.

Bye
 
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.
 

ashiza

Member

Gleen":14wt8jh6 said:
Hey, just wondering... is it possible to run some actionscript within the flash file?

Yeah, you can. I have a movie clip that eases in with AS in one of my .swf's.
 

ashiza

Member

Though, I have a question myself... I'm calling up a .swf during my game (In a ZTBS battle by the way) but it won't disappear for awhile, even with the button skip set. Any help?
 
$flash.play("pirate.swf", 1) here an example, i call script on common event when using the skill in ztbs...

and maybe you have LOOP on on Flash script... Take a look over this.

-------------------------------------------This on 263 Script Line
class Play

def play(filename, button)
fondo = Sprite.new
fondo.bitmap = Bitmap.new(640, 480)
fondo.bitmap.fill_rect(0, 0, 640, 480, Color.new(0,0,0,255))
fls = RMFlash.load(filename, 640, 480)
fls.loop = 0 <----------------------------- LOOK IF YOU HAVE 1 change to 0 like it is here.


Bye
 

EpE

Member

WoW O.O

I test it and it runs it .... scriptors always amaze me

this is an epic script when its finished
 
you can :3, only need to edit the battle script, in the part of battleback sprite definition, change the image sprite for a flash and set loop to 1 =)
 

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