Removing an NPC after an event.

Status
Not open for further replies.

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
665
Reaction score
232
First Language
English
Primarily Uses
N/A
Hi guys,

Is there any other way to make an NPC disappear after a cutscene event, beside making a new switch? For example, there are three NPCs in a cutscene. One of them joins the party, after she joins, the old NPC sprite must disappear, right? If I exit the room, the sprite appears again.

I tried using a script to remember their position, but it doesn't work when I change their graphics to "None". I am pretty sure I am not supposed to use self-switch, since it doesn't effect anything beside the event itself.
 

That Bread

Veteran
Veteran
Joined
Jan 4, 2014
Messages
1,623
Reaction score
469
Primarily Uses
When I make an event for a disappearing NPC. I always do self switch A, B, C or D, then add a new event page that is blank. The NPC never returns. Hope that helps!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
or if you want to control them from another event, switches... unless you wanna control their self switches from another event, though it's only a simple script call:

Code:
$game_self_switches[[map_id,event_id,self switch]] = true/false
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
If you want the sprite to disappear for good, you need a second page, no graphic on the NPC event itself.  On the first page have it turn self switch A ON at the appropriate moment; your second page has self switch A as a condition (on the left side of the event page).

Ninja'd
 
Last edited by a moderator:

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
665
Reaction score
232
First Language
English
Primarily Uses
N/A
When I make an event for a disappearing NPC. I always do self switch A, B, C or D, then add a new event page that is blank. The NPC never returns. Hope that helps!
It works when you talk to the NPC itself. I was talking about when you have another event to handle the cutscene, and the NPCs on the screen are just for show. I used self switches and when I came back, they still reappear, and I doubt self switches are used that way.

or if you want to control them from another event, switches... unless you wanna control their self switches from another event, though it's only a simple script call:

$game_self_switches[[map_id,event_id,self switch]] = true/false
I haven't tried this, yet. Sounds like it might work, but is there a shorter way? :o
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
That is the ONLY way to change one event's self switch from another event.


If your NPCs are ONLY there for the cutscene, you can start with a blank event, do a Set Move Route > Change Graphic to show the NPC when they need to appear, and the same again to remove the graphic when it's over.


Other than that, a switch is the only way.


The script you are referring to that causes an event to remember its position makes it remember its position. It is not intended to save graphics or anything else, though it could be modified to do so (though really, it'd be just as easy to use one of the above methods).
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
but is there a shorter way?
Hmmm... only a wrapper

class Game_Interpreter def ss(map_id,event_id,switch,value) $game_self_switches[[map_id,event_id,switch]]=value endendPut that in a blank script, then you can just use it like (from event commands only or with any Game_Interpreter object):

Code:
ss(1,1,"A",true)
that means Self switch A of Event 1 on map 1 will be truebut really, it's pointless to do this IMO...
 
Last edited by a moderator:

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
665
Reaction score
232
First Language
English
Primarily Uses
N/A
^ Nice scripting. :)

That is the ONLY way to change one event's self switch from another event.

If your NPCs are ONLY there for the cutscene, you can start with a blank event, do a Set Move Route > Change Graphic to show the NPC when they need to appear, and the same again to remove the graphic when it's over.

Other than that, a switch is the only way.
 
Hm... That could work, but not always, especially when you are transferring from another map. I just want to make sure I am using switch properly and not waste them for a short cutscene.

Thanks all. :)
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You can still do it, even if transferring from another map. It's all in the type of trigger you use and how you event it.


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.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top