Script Call Support Boards
RPG Maker VXAce SupportThank you. Did and fixed. Odd. I own the CD and I guess it is old. :/
@Engr. Adiktuzmiko
Thank you for helping me out! Although, there seems to be an error. Upon running the script call, I get a Game_Interpreter line 1409 crash.
Thank you for helping me out! Although, there seems to be an error. Upon running the script call, I get a Game_Interpreter line 1409 crash.
Is it possible to use a script call to check for one of a player's map variables?
I know the $game_player.pos? (x,y) checks them both but I'm curious if it's possible to check for just one or the other. 👋
I know the $game_player.pos? (x,y) checks them both but I'm curious if it's possible to check for just one or the other. 👋
Edit:
# X and Y's
# ----------------------------------------------
$game_player.x
$game_player.y
Look here for more:
https://forums.rpgmakerweb.com/index.php?threads/script-call-collection-for-vxace.25759/#entry247426
For my question. Is this a valid script call?
$game_map.events[$game_variables[35]].set_graphic("!A2D",$game_variables[58])
Not sure if it's really a bump, but I'm still having issues with the script call:
Namely, I get the crash message:
Game_Interpretor:1409 in "eval" undefined method "each" for #Game_Actors, NoMethodError
Code:
(1..56).each do |skill_id|
$game_actors.each do |actor|
if actor.skill_learned?(skill_id)
$game_variables[actor.id+100] += 1
end
end
end
Namely, I get the crash message:
Game_Interpretor:1409 in "eval" undefined method "each" for #Game_Actors, NoMethodError
@Vis_Mage Perhaps do $game_party.members instead of $game_actors?
Hey, thank you for the suggestion! Although, after switching the line, I now get this error:
Game_Interpreter:1409:in `eval': undefined method `skill_learned?' for #<Game_Actor:0xaf7a300>, NoMethodError
Bump 😴
It's because the method name is "skill_learn?(id)" without "ed"
I am trying to identify if an enemy has been inflicted with a debuff, and then use a script call to remove it.
I think that to identify if the debuff is present I would use this script call in a conditional
$game_enemy[1].debuff?(3)
However, I have no idea what the script call to remove it might be.
Any help would be appreciated.
Thanks.
EDIT
I need more help than I thought. After testing, that script call to identify if the enemy has a debuff doesn't work, so suggestions for that too would be appreciated.
I think that to identify if the debuff is present I would use this script call in a conditional
$game_enemy[1].debuff?(3)
However, I have no idea what the script call to remove it might be.
Any help would be appreciated.
Thanks.
EDIT
I need more help than I thought. After testing, that script call to identify if the enemy has a debuff doesn't work, so suggestions for that too would be appreciated.
@Kes You could use the following:
Switch the < to a > if you want it to check buffs.
EDIT:
Hang on, debuff?(param_id) should work. Where are you calling this from?
Code:
b.param_buff_rate(3) < 1.0
Switch the < to a > if you want it to check buffs.
EDIT:
Hang on, debuff?(param_id) should work. Where are you calling this from?
@A-Moonless-Night I'm calling this from a troop event.
I'm slightly confused by the suggested script call. What does the < 1.0 at the end do? And is that for identifying if the debuff is present, or for removing it?
For your edited alternative suggestion, how do I specify that it is for enemy[1] and not some other enemy?
I'm slightly confused by the suggested script call. What does the < 1.0 at the end do? And is that for identifying if the debuff is present, or for removing it?
For your edited alternative suggestion, how do I specify that it is for enemy[1] and not some other enemy?
$game_enemy is not a correct call. With troop events, you can use $game_troop.members. For example, $game_troop.members[0] would give you the first member in the troop.
If you want to find all troop members that are slimes, enemy 1 (using default database), you could do:
Combining that with the debuff check:
If you want to iterate through all slimes with debuffed defense:
And if that script call is too big, just break it down:
If you want to find all troop members that are slimes, enemy 1 (using default database), you could do:
Code:
$game_troop.members.select { |enemy| enemy.enemy_id == 1 }
Combining that with the debuff check:
Code:
$game_troop.members.select { |enemy| enemy.enemy_id == 1 && enemy.debuff?(3) }
If you want to iterate through all slimes with debuffed defense:
Code:
$game_troop.members.select { |enemy| enemy.enemy_id == 1 && enemy.debuff?(3) }.each do |e|
e.remove_buff(3)
end
And if that script call is too big, just break it down:
Code:
a = $game_troop.members.select { |enemy| enemy.enemy_id == 1 && enemy.debuff?(3) }
a.each do |e|
e.remove_buff(3)
end
Index identification uses
Code:
$game_troop.members[INDEX].debuff?(param_id)
> param_id goes as follow.
Putting something like this
Code:
$game_troop.members[0].debuff?(3)
To remove buff/debuff using script call. you use
Code:
<battler object>.remove_buff(param_id)
If you want to use directly for actor then $game_actors[id]
If you want to use it for party member then $game_party.members[index]
If you want to use for troop enemy, use $game_troop.members[index]
If you want to check if troop member index 0 has the debuff, then remove it.
Code:
if $game_troop.members[0].debuff?(3)
$game_troop.members[0].remove_buff(3)
end
If you want to blindly checks all the enemy battlers and remove the debuff when it presents.
Code:
$game_troop.members.each do |enemy|
enemy.remove_buff(3) if enemy.debuff?(3)
end
@A-Moonless-Night and @TheoAllen
Thank you both very much. With your explanations, not only do I know what to do, I know why to do it that way, so that I can apply this to other uses as well.
I am grateful to you both.
Thank you both very much. With your explanations, not only do I know what to do, I know why to do it that way, so that I can apply this to other uses as well.
I am grateful to you both.
Shifting my question here since I'm an idiot and didn't see this thread.
Would someone mind telling me how to call Force Action via script? (actor and enemies, in this case skill 5) I've tried
$game_party.members[1].force_action(5,-2)
$game_troop.members[1].force_action(5,-2)
But nothing happens. What am I missing?
Would someone mind telling me how to call Force Action via script? (actor and enemies, in this case skill 5) I've tried
$game_party.members[1].force_action(5,-2)
$game_troop.members[1].force_action(5,-2)
But nothing happens. What am I missing?
@Theguysayshi you can try to look at the game interpreter, command_339, line 1356
Quick question, is there a script call that can determine the last actor that attacked?
For some context, I'm looking to recover 5% MP to an actor whenever they land a killing blow.
For some context, I'm looking to recover 5% MP to an actor whenever they land a killing blow.
Bump 👋
Original thread: https://forums.rpgmakerweb.com/threads/script-call-support-boards.25767/