Thanks! Sorry if this wasn't the right spot for that question, I just assumed this would be the place as it seemed important to understand the difference between $data_ and $game_ to know how to set up my script calls properly.
Hopefully this question is more on topic:
I noticed in the list there are two alternative options shown for playing SE/ME/BGM/BGS:
Audio.bgm(play(name,volume, pitch)
RPG::BGM.new(name, volume, pitch).play
Is there any difference between these that I should know about before using them as a call?
I also noticed that there are these:
$game_map.screen.change_weather(type, power, duration)
screen.pictures[n].erase
Is there a reason why in one scenario I should call screen stuff with the prefix and another without?
how would i write $game_actors[X]
where X is the one with a state applied?
$game_actors.select {|actor| actor.state?(id)}[0]
where id is the id of the state you're interested in (no leading zeros). This COULD give you an array of several actors, which is why I added the [0] at the end, to select just the first one. That might cause an issue though, if NO actors have the selected state. It would probably crash and say [] invalid for nil object or something like that.
thank you Shaz.
i've been working on this since this morning and cant get it to work
what is wrong with this?
learn require eval
if $game_actors.select {|actor| actor.state?(103)}[0].weapons.include?($data_weapons[8]);
then $game_switches[8] = true;
else;
end
/learn require eval
my error reads
script 'yanfly engine ace - learn skill engine v' line 706: NoMethodError occurred.
private method 'select' called for # Game_Actors:0x7b9ebe4
im trying to only allow the skill to be leant by when the weapon is equiped
guessing i could probably cut the state and use something like
$game_actors.select {|actor| actor.weapons.include?($data_weapons[8]}
im a complete newbie in script 🙁
Thank you so much.
My problem isnt fully resolved but what youve given me has cut out a lot of work in my end goal.
I'll do as you said about the thread after i try fixing it myself.
thanks again ^^
quick question
if im using
actor = 1
text = "Someone learnt a skill!"
inside a script call
how would I make
text = "\\N[actor] learnt a skill!"
work, where \\N[ 'actor' ] equals what actor equals?
hope that made sense haha
I don't know if this is bad etiquette or not but its been a while so I'll post about it again.
I'm learning ruby to try and resolve it myself but I want to keep working on my game still.
I think I have the solution but it doesn't work
what is wrong with this?
actor = 1
text = "\\N[#{actor}] learnt a skill!"
Is it because actor isn't a string?
text = "\\N[" + actor + " learnt a skill!"
Shaz has a typo and missed a bracket:
text = "\\N["+actor+"] learnt a skill!"
thanks guys. still have lots to learn.
This is the third time your helping me out now Shaz ^^
Ty sir
alright ... what was the typo? That's going to bug me now until you tell me. I can't see it. I can only see the bracket you added.
the bracket was the typo I meant - only one error, my wording might have been sub-optimal if you read it as two errors...
oh yeah, I did think you meant a typo AND a missing bracket.
Hello again. Another easy question I hope
Why does
for x in 3..8
$game_temp.reserve_common_event(x)
end
only run comment event number 8?
I think it has something to do with numbers 3..7 either not being placed in que or getting skipped?
I've worked around it so its not an issue but i'd like to find out why.
Please help ^^
Is there a way I could set up... something... so that turning a switch on runs a script call, and turning it off runs a separate script call, preferably using common events rather than an event that has to be always running/on every map? I'm trying to use this to change screen resolution in my game but if I have an autorun common event that changes it(via script call) when a switch is turned on it won't return to normal without a separate script call to set it back to normal. Any creative solutions?