NPC issues

Status
Not open for further replies.

JamesCalibur

Villager
Member
Joined
Jul 24, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
Hello, I've been working on a game over the past few day's but I've reached a problem at the start of the game i want the npc to start an autorun cutscene, then walk to a position i set for him/her, then remain their when i leave the screen the screen and comeback, continuing to say what i programmed.

but here's how the event plays out

the event start and the conversation is played, at the end of the conversation i have the npc walk 5 spaces to the right then face the left. then i have a switch to switch it to the next part of the event,

the next part is the npc saying some dialogue then ending the event. which works while I'm on the screen, but if i leave to another map the npc is standing back where they originally started. 

I've tried two methods the first is using controlled switch, i feel i have the right idea with this but the npc will appear back where he/she started but the moment i talk to them will port back to where i told her to move in the first part of the event before continuing the dialogue. then repeats if i leave the screen.

the second way i tried was using self switches but this feels completely wrong, mainly because it states things will reset when i leave, which it does but instead of teleporting back to the spot when talked to the npc just stays put.

I feel close to being right with the first way i tried it but I'm missing something small to keep the npc put, but it's the what I'm unsure of.

any help would be great, if i solve it in the mean time i will reply.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
Upon entering a map, that map's data is loaded from the fixed editor data - which is why the events are back at their original position.

If it's about a few cases only you might use general switches to trigger a set event location, but in most cases or when you need it for more than two or three events, that's a big and unneccessary work.

Better to use a script for remembering the event's positon, like

http://forums.rpgmakerweb.com/index.php?/topic/1853-remember-event-position/
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
Hello, I've been working on a game over the past few day's but I've reached a problem at the start of the game i want the npc to start an autorun cutscene, then walk to a position i set for him/her, then remain their when i leave the screen the screen and comeback, continuing to say what i programmed.

but here's how the event plays out

the event start and the conversation is played, at the end of the conversation i have the npc walk 5 spaces to the right then face the left. then i have a switch to switch it to the next part of the event,

the next part is the npc saying some dialogue then ending the event. which works while I'm on the screen, but if i leave to another map the npc is standing back where they originally started. 

I've tried two methods the first is using controlled switch, i feel i have the right idea with this but the npc will appear back where he/she started but the moment i talk to them will port back to where i told her to move in the first part of the event before continuing the dialogue. then repeats if i leave the screen.

the second way i tried was using self switches but this feels completely wrong, mainly because it states things will reset when i leave, which it does but instead of teleporting back to the spot when talked to the npc just stays put.

I feel close to being right with the first way i tried it but I'm missing something small to keep the npc put, but it's the what I'm unsure of.

any help would be great, if i solve it in the mean time i will reply.
What I would do is just create an event that runs anew every time the player enters a new area that manages your other events.  That way you can move all of your NPCs around to where ever you want based on variables and switches before the player actually interacts with the map.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
What I would do is just create an event that runs anew every time the player enters a new area that manages your other events.  That way you can move all of your NPCs around to where ever you want based on variables and switches before the player actually interacts with the map.
True - but that's exactly the problem. To do this consistently, you'll need a lot of variables to store the game's / map's status, and you have to keep track of them for every map.

Using the script to remember event positions is adding one script and adding one script call to every event that should remember its position.
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
True - but that's exactly the problem. To do this consistently, you'll need a lot of variables to store the game's / map's status, and you have to keep track of them for every map.

Using the script to remember event positions is adding one script and adding one script call to every event that should remember its position.
I've never used that script but it definitely looks handy. 
 

JamesCalibur

Villager
Member
Joined
Jul 24, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
I must not be using that script properly because it's not working for me, I've just started studying game design so scripts are still slightly confusing if your not sure where to use them or what each code means.

so here's how i have things set up, let me know what's wrong.

first off i have the script under the script editor>Materials. then I put the code  $game_map.events[@event_id].save_pos() placed under in database>common events> id:001(is where i placed the event). A quick question from here, to i put the coordinates in the () of the code,  and do i put 001 in the [@event_id] if so do i keep the @ sign or does the script add this stuff by itself?

Now where do i put the code, I've tried a few ways, first i placed the code in the NPC's event code before and after the switch changed to the 2nd part, that never worked so i put the switch in the 2nd part of the script before you talk with the npc and that never worked, lastly i tried setting up a new event that trigger at the same time my npc changes to the 2nd event which never worked which is why I'm here.

I hope this is not to confusing. if you need more information let me know. also if i can't get this to work Berylstone how do you do your method.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You should be asking that in the thread for the script, not here.

Why are you putting it in a common event? If you WANT to have it in a common event (so you can call it from multiple events without having to rewrite it all the time), then you definitely DON'T want to put 001 in (and if you did, you'd just put 1, not 001, as that might cause other issues).

If you do a move route on an event and you want it to stay where it ends up next time you come into the map, the easiest thing is just to add a Script: save_pos at the end of the move route. So:

Code:
Set Move Route (EV001) (Wait for completion): Move left    Move left    Move left    Move left    Script: save_pos
 

JamesCalibur

Villager
Member
Joined
Jul 24, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
Wow it worked thanks Shaz, after a few stupid moments, mainly i did not realize the move route had script in it so i kept on going to advance and typing the code in or going to move route, set the movement then going to advance and adding the save_pos, oh and for your information it doesn't work haha. but after my stupidity took effect i realized the issue and it worked. though quick question does that save_pos part of the script andar gave me or is it build into rpg maker?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
save_pos is a new script, it is not built into the engine by default. You have to copy it from the thread, paste it into a new slot below Materials (this is all explained right in that thread), and then you can call save_pos on an event.
 
Last edited by a moderator:

JamesCalibur

Villager
Member
Joined
Jul 24, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
yeah i all ready did that which is how i got things to work. I just didn't know if that was built in or not. i had a feeling it was the script just wasn't sure, 

once again thanks for the help.
 

JamesCalibur

Villager
Member
Joined
Jul 24, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
thank you to everyone who helped me
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.


Please don't double post. If the last post is yours and you need to add more, and the post is less than 3 days old, just edit it instead.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

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