Script Call Support Boards

Code:
$data_system.sounds[22] = RPG::SE.new("Fire1", 80, 100)
"Fire1" = SE name
80 = volume
100 = pitch
Change it as you wish
Code:
$data_system.sounds[22] = RPG::SE.new("Fire1", 80, 100)
"Fire1" = SE name
80 = volume
100 = pitch
Change it as you wish
Thank you very much 🙂.
I know that I knew this once, but I can't find my note.

How do I identify which actor is using an item so that I can deduct MP/TP from that actor?

Thanks.
Single target item:
Just use formula a.tp (or mp) -= n

Multi-target item
v[99] = a.actor.id; <formula or leave at 0 if you don't want to use formula>
It assigns the actor's id in variable 99, for maybe to be used in the common event, idk I'm not familiar with common event usage for item/skill.

I'm not sure if this was in your note.
@TheoAllen Thank you. Just what I was looking for.
I need a conditional-scriptcall based on what BGM is currently playing based on its name. For
example, if BGM "Theme1" is playing, then the scriptcall asking for "IF BGM Theme1 is playing" should be resulting in TRUE. How would I do that?
Code:
RPG::BGM.last.name == "Theme1"
I am trying to use a script call in a conditional event to find out the size of the enemy troop. I have tried
$game_troop.members.size?3
but that produces the error message
'undefined method 'size?'

Can anyone correct my syntax?
Thank you.
As a golden rule of thumb, ruby methods only end with a question mark if they return a boolean value (e.g.: $game_troop.members.empty?). What you need here is to compare the returned value of either size or length (they are both aliases for the same method) with the actual number (in your case 3).

The result is something like this:
Code:
$game_troop.members.size == 3
# OR
$game_troop.members.length == 3
$game_troop.members.size?3
$game_troop.alive_members.size
@Heirukichi and @Roninator2
Thank you both. I now understand what I was doing wrong, which is better than just having the answer with no explanation.
And that addition of troop.alive gives me more flexibility, should I need it.

Your help is much appreciated.
Could I ask someone to check my syntax here.
It is a script call in a conditional to check whether armour item 103 is equipped by anyone in the party.

Code:
$game_party.battle_members.select {|actor| actor.armors.include?($data_armors[103])}

Thank you
Code:
$game_party.all_members.any? {|actor| actor.armors.include?($data_armors[103])} # All party members
$game_party.battle_members.any? {|actor| actor.armors.include?($data_armors[103])} # Active party members (for battle)
$game_party.alive_members.any? {|actor| actor.armors.include?($data_armors[103])} # Alive party members
@TheoAllen
Thank you.
Those script calls work fine for sure but you could also add this snippet in case you wanna reuse it often.

Code:
class Game_Actor
  def include_armor?(aid)
   armors.include?($data_armors[aid])
  end
end

The New Script Call:

$game_party.battle_members.any?{|actor| actor.include_armor?(103) }

The same is valid for the other party member types.
having a problem with items disappearing when my game relaunches a 2nd time. the variables are correct but the picture of the items are gone apon the relaunch/reset. any ideas to fix this?
@PoniMeiMei This thread is for specific questions about VXAce's scripting language. You'll get more helpful responses if you start a new thread in the VXAce Support forum.
mhm okay sorry!! im still a bit new so i apologize!
I need to be able to change the 'occasion' for a particular skill.
At the moment it is 'Only from the menu'
I need to make it 'Never' for a while and then change it back to 'Only from the menu' but I have no idea how to do that.

Can anyone help?
Thanks.
I need to make it 'Never'
$data_skills[XX].occasion = 3
0 = always
1 = battle
2 = menu
3 = never

Original thread: https://forums.rpgmakerweb.com/threads/script-call-support-boards.25767/