Calling Scripts: Why no info?

Diretooth

Lv. 25 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,231
Reaction score
444
First Language
English
Primarily Uses
RMMV
Okay, I'm using Yanfly's Party System (http://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/), and I'm at a part in my game in which I need to lock a character so that people can't move them around. However, I have no idea how to call the script to make said character locked.

Right now, my only attempt to try to call a script is, based on the fifth image on the page I linked,

Script: lock_actor(1)

           call_party_menu

This was based on the assumption that that was how you do it. Of course, it doesn't lock the character and only brings the Formation menu up.

I tried a variation: call_lock_actor(1) which caused the game to crash.

I also spent several minutes looking at both the in-program help booklet for how to call scripts. I was met with nothing.

Also, on the off chance that this will help, I named the script in the Script Editor, under the Materials subsection, Party_Script.
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Are you sure you're just making an evented script call that ONLY states

lock_actor(1)or

call_party_menu ?

If you're going to use both, they have to be in separate evented-script-calls. Otherwise it will only return the last command.
 
Last edited by a moderator:

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Try my suggestion first, if that doesn't work then do what Xypher linked to.

(Summarizing)

Go to the method def lock_actor(actor_id) and change

return unless $game_party.battle_members.include?(actor.id)to this instead:

return unless $game_party.battle_members.include?(actor)The other methods are also written with (actor) only, so I guess Yanfly messed up on that part. I'm surprised he hasn't fixed it yet,
 
Last edited by a moderator:

Diretooth

Lv. 25 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,231
Reaction score
444
First Language
English
Primarily Uses
RMMV
Forgot to mention. I am NOT script savvy and I operate best by visual explanation, in other words, videos and images. But, I will try my hardest to follow your suggestions.

I had tried to do just lock_actor(1) before, it had done nothing.

EDIT: I tried removing the .id thing from the script, and nothing changed. I had created a small event with lock_actor(1) as the only thing on it. I tested it with both .id in and out of the script. Nothing worked.

For future reference, script calling is done via the third tab in event commands, 'Script...' button under the section 'Advanced', correct?

FINAL EDIT: I figured it out. I was referencing actor 1 not actor 9 (Older version of actor 1). I had to use lock_actor(9) because actor 9 was in the party. So, now it works, and the script is the same as it was before. (Perhaps people having trouble with the script used the lock script call before adding the character...)

In any case, I don't need any assistance with this anymore. Hopefully this can be used by other people with similar problems.
 
Last edited by a moderator:

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
For future reference, script calling is done via the third tab in event commands, 'Script...' button under the section 'Advanced', correct?
Yup.

Hmm... Is Actor 1 part of your battle party? Maybe this is why...

return unless $game_party.battle_members.include?(actor.id)What this is saying is that it will not lock unless Actor 1 is participating in battles. Make sure Actor 1 is in your battle party and try again. If nothing then comment out that line using # right before it on the same line.

It's located in the same method def lock_actor(actor_id)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top