Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> help with force action
darkace77450
post Aug 8 2010, 05:16 AM
Post #1


Level 4
Group Icon

Group: Member
Posts: 46
Type: None
RM Skill: Undisclosed




I'm looking to make a few skills using force action that are usable by any character and tie these skills to the use of items from the player's inventory. Am I going to have to use variablse and conditional branches to force the action subject be the correct user of the skill? Or is there another, easier way to do this that I'm just not seeing? Thanks.
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Aug 8 2010, 08:03 AM
Post #2


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




The only other way I can think of would be to force the action via Call Script commands. It's not that complicated: it's simply mimicking the Force Action command.
There are several steps for this:
1 - Go into the Scene_Battle section, and just under Scene_Battle < Scene_Base, add this line:
CODE
attr_reader  :active_battler
Now you can use Call Script commands when you intended to use Force Action.

2 - First, indicate the type of action. For a skill, it's 1.
CODE
$scene.active_battler.action.kind = 1


3 - Then, the ID of the skill.
CODE
$scene.active_battler.action.skill_id = 3
I used 3 as an example, but you can use whatever you want.

4 - The target of the skill. You have three possibilities.
CODE
$scene.active_battler.action.decide_last_target
The previously selected target.
CODE
$scene.active_battler.action.decide_random_target
A random one.
CODE
$scene.active_battler.action.target_index = 0
A specific target. The number is the index in the troops.

5 - Then turning the force flag on.
CODE
$scene.active_battler.action.forcing = true
$game_troop.forcing_battler = $scene.active_battler


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th May 2013 - 07:58 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker