Hello,
This is a really silly question :-[
I have made a cutscene before the title screeen in my RPG Maker XP game, and I need the battle animation 'Dark 1' to appear and then a knight walks out of it. I have done this, but when I test it, a message pos up saying the following,
????? 'Sprite_Character' ? 72 ??? NoMethodError ????????
undefined method `[]' for nil:NilClass
What's going on? ???
Here's a screenshot of the error message:
http://www.megaupload.com/?d=SP1JPQIW (http://www.megaupload.com/?d=SP1JPQIW)
It looks like no one is answering your message :( so I'll give it a shot.
I have no experience with XP, the only advice I can think of relates to when I have a similar problem on 2K3.
When scripting a command or event and it gets to be extremely cluttered I find the system can't handle it and will tend to glitch up. Re-do the event ( start a new one then individually copy and paste from the old event ) and make sure you leave out any un-necessary commands, or any thing that conflicts.
Also check that the spell is set up properly.
Hope this helps :)
Did you add new scripts?
I am guessing an array method is called on an object that is empty, thus giving the undifened method array for nil is nilclass...
Open up your script editor after getting the error. It should point at line 72 from Sprite_Character. Give me that line!
This is what Line 72 says:
animation = $data_animations[@character.animation_id]
I also tried starting the event again. No luck.
Here's a pic of the event.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi124.photobucket.com%2Falbums%2Fp38%2Feternalcries%2Ferror_event.jpg&hash=f7ced3f3b7ef108541827c378753ab2727e904d8)
I see. Aparently @character is empty... Kinght is an event?
Knight is created from an event, and I want 'Dark 1' to happen on him, which is why I have it after Switch 1 is activated, which makes Knight appear.
that knight is installed right? (imported)
Perhaps if you want a cut scene you should use flash and have it show the picture or something.
Your method is a little different to how i'd do it but...
> Show battle animation Dark 1
> wait 6 frames (adjust the length to personal preference)
> switch: DKA!
------------
Pre con: Switch DKA is on
> Dark Knight moves...
That's basically how i'd do it...
that switch: Start Chase, could be used for another event ...that event would then switch on another switch (switch 2), then press new page (on the EV004) set pre con that switch 2 is activated then have the knight appear and do his thing.
I'm not much of a simple person when it comes to events, but I do like them to work correctly.
I think you've just got a slight issue with event progression. Oh yeah last thing...i don't recommend your hero disappearing...
---------------------------
Evaluation
Ev001: (Page 1)(autostart)
>Flip switch 001 ON
>Flip switch 002 ON
>Erase Event
Ev001: (Page 2)(parallel event) (Precon: Switch: 002 ON)
>Erase Event
Ev002: (Page 1)(parallel event)
Precondition: Switch 1 ON
> Play sound effect 'aaaaaak'
> Pan screen up (if you wish)
> Move Hero
> switch 003: Dark Knight appears ON
> wait 20 frames (or longer/shorter depending on knights animation)
> Show emotion "surprise" (or something close too)
> Move hero
Ev003: (Page 1) (parellel event)
precondition: switch 003: Dark Knight Appears ON
>switch 004: Dark Knight appears 2 On
>Show battle animation Dark 1
Ev003: (Page 2) (Parallel Event)
precondition: switch 004: Dark Knight appears 2 is ON
> Wait 20 frames (or longer/shorter)
> Change graphic to knight
> Move Ev003
---------------------------
Note, this event will not start again. It will happen only once. But i believe it should do what you want.
Ev001 should be placed on an impassable area
Ev002 the same
Ev003 should be placed where you want the knight to appear
(Events 1-3, may be replaced as your choice, the same with the names, i also recommend naming the switches something you know)