RMVX Ace Script Call Eventing Procedures.
#1
This was copied in part from RPG Maker (rpgmakerweb.com)

Enclosed is a compiled list of several script calls that mimic event actions.


Variables
$game_variables[n]

Switches

$game_switches[n]

Conditional Branch

if#something#somethingelse#somethingend

Show Picture

screen.pictures[index].show(file_name, upperleft/center, x, y, x zoom, y zoom, opacity, blend type)

Move Picture

screen.pictures[n].move(0/1(top left or center), x, y, zoom1, zoom2, opacity, blend type (0,1,2), wait)

Picture Tone

screen.pictures[n].start_tone_change(Tone.new(0,0,0,0), wait)

Looping

For#somethingend

Move Event

move_route = RPG::MoveRoute.new
move_route.repeat =false
move_route.skippable =true
m = RPG::MoveCommand.new
m.code =45#The List of M Code can be found over Game_Character, this current m.code is call script
m.parameters =["script call here"]
move_route.list.insert(0,m.clone)
$game_player.force_move_route(move_route)

Transfer Event Location

$game_map.events[id].moveto(new_x, new_y)

Transfer Player

$game_player.reserve_transfer(map_id, x, y, direction)

Screen Tint

t =Tone.new(red,green,blue, gray)
screen.start_tone_change(t, duration)

Shake Screen

@params=[]@params[0]= power or $game_variables[x]@params[1]= speed or $game_variables[y]@params[2]= duration or $game_variables[z]

Call Common Event:
$game_temp.reserve_common_event(id)

Play SE/ME/BGS/BGM:
RPG::SE.new("SE Name", volume, pitch).play
RPG::ME.new("ME Name", volume, pitch).play
RPG::BGS.new("BGS Name", volume, pitch).play
RPG::BGM.new("BGM Name", volume, pitch).play

Show Text:
$game_message.add("Text")

Gain/lose Item:

$game_party.gain_item($data_items[id], amount)
$game_party.lose_item($data_items[id], amount)
(For weapons/armor use $data_weapons or $data_armors in place of $data_items.)

Gather Followers:

$game_player.followers.gather

Change Player Followers:

$game_player.followers.visible =trueorfalse

Erase Event:

$game_map.events[event_id].erase

(Conditional) Button pressing
Input.repeat?(:A)Input.press?(:A)
[b]
(Conditional)
Movement
[/b]
$game_player.dash?
$game_player.jumping?
$game_map.events[event_id].moving?
$game_map.events[event_id].jumping?
[b]
(Conditional)
Location
[/b]
$game_map.events[event_id].x
$game_map.events[event_id].y
$game_player.x
$game_player.y

Remove Actor

$game_party.remove_actor(actor_id)

Add Actor

$game_party.add_actor(actor_id)

Remove Party Member from position (where x = party position. 0 = 1st member, 1 = 2nd member, etc.)

m = $game_party.members
$game_party.remove_actor(m[x].id)

Gain/lose gold:
$game_party.gain_gold(amount)
$game_party.lose_gold(amount)

Check for current max gold:
$game_party.max_gold

Get map id and name:
$game_map.map_id
$game_map.name

Show Choices
params=[]
choices =[]
choices.push("choice 1")
choices.push("choice 2")params.push(choices)params.push(0/1/2this part iswhere you press cancel and which choice to default)
setup_choices(params)

(this is very good when trying to stop the 4 choice maximum, you can use this with the following work to define what happens on each choice)
The definition is just...


command_skip if@branch[@indent]!=@params[0]
Where @params stores the choice number for that specific branch (0, 1, 2, ... )

So all you have to do is replace @params[0] with an integer

if@branch[@indent]==0# branch for first choiceelsif@branch[@indent]==1# branch for second choiceend



If anyone has any others that they'd like to add to this, I'd love to see them.
[Image: AVvXsEga1vIr5Rx3FkoFbGo1OoMJAqgq6TeqcbpF...L3AWg=s752]

BLOG: JayVinci.blogspot.com
FORUM COMING SOON
Currently working on:
Ambitions: RPG Developer Bakin
Heart of Vox: RPG Developer Bakin
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   RPG Developer Bakin: Material Albedo (with C# script) JayRay 0 1,465 01-19-2023, 04:59 AM
Last Post: JayRay
   When NOT to Use a Script kyonides 0 1,817 12-10-2021, 09:09 AM
Last Post: kyonides
   Script Writing and Usage: A canine perspective DerVVulfman 0 4,136 09-27-2019, 05:03 AM
Last Post: DerVVulfman
   Proper Script Placement and Usage for RGSS 1 through 3 kyonides 1 3,966 08-25-2019, 08:36 AM
Last Post: kyonides
   How to turn your RMXP/RMVX project into a single installable EXE. Third333Strike 2 13,599 05-13-2014, 12:32 AM
Last Post: JayRay
   Simple eventing - The King's Speech Pherione 0 5,060 05-20-2011, 09:09 AM
Last Post: Pherione
   Eventing - Chapter 1 deValdr 0 3,983 10-14-2010, 08:16 PM
Last Post: deValdr
   Advanced RMVX Windowskin Template Xilef 0 8,524 10-08-2009, 11:41 PM
Last Post: Xilef
   RMVX Editor Hotkeys vgvgf 0 4,208 09-29-2009, 01:25 AM
Last Post: vgvgf



Users browsing this thread: 1 Guest(s)