RPG Maker Forums

I'm trying to store the name of the first Skill an Actor has, in a variable. Variable 68 is the Actor ID.

I've put in the following:

◆If:Script:$dataSkills[$gameActors.actor($gameVariables.value(68))._skills[0]].name === null
◆Control Variables:#0090 Party Member Skill = 50

:Else
◆Script:let skillname = $dataSkills[$gameActors.actor($gameVariables.value(68))._skills[0]].name;
: :$gameVariables.setValue(90, skillname);

:End

(By the way, the skill name of Skill 50 is "None".)

I thought this would allow me to get past an Actor who has no Skill, but I get the error "Cannot read property 'name' of undefined". However, it DOES work when the Actor has a Skill. Help please!

EDIT:I figured it out. I made the conditional branch check how many skills an actor had with this $gameActors.actor(1).skills().length. If 0 then (stuff) if not 0 then (different stuff)

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,037
Messages
1,018,464
Members
137,821
Latest member
Capterson
Top