text change while npc moving

XGuarden

Veteran
Veteran
Joined
May 10, 2016
Messages
446
Reaction score
17
First Language
French
Primarily Uses
In my game, some time npc move to go in the bed.
While thy move to the bed thy say something and whn sleping something else.

Just to be clearn, it's the move route that was used.

I want to know what to put in conditional brench for check if npc is curently moving when I talk to him.

Thanks.
 

Sardonic

Veteran
Veteran
Joined
Sep 3, 2016
Messages
34
Reaction score
21
First Language
English
Primarily Uses
I don't know about using a conditional branch for this, someone else may be more helpful for that, but I believe another way you could do it is using a switch and a new tab on the moving npc.

1.Make a switch "NpcMoving"
2.Turn it on when the npc moves to go to bed
3.Make a new tab on the npc with the trigger condition being the switch "NpcMoving"
4.Add text for what you want the npc to say while going to bed into this new tab.

When your npc is in bed, turn the switch off so they don't keep saying that text.

This may be a kind of clunky way to do it, but it should work, I think.
 

XGuarden

Veteran
Veteran
Joined
May 10, 2016
Messages
446
Reaction score
17
First Language
French
Primarily Uses
I don't know about using a conditional branch for this, someone else may be more helpful for that, but I believe another way you could do it is using a switch and a new tab on the moving npc.

1.Make a switch "NpcMoving"
2.Turn it on when the npc moves to go to bed
3.Make a new tab on the npc with the trigger condition being the switch "NpcMoving"
4.Add text for what you want the npc to say while going to bed into this new tab.

When your npc is in bed, turn the switch off so they don't keep saying that text.

This may be a kind of clunky way to do it, but it should work, I think.
its exacly the way i cant use lol. Hard to explain....
 

XGuarden

Veteran
Veteran
Joined
May 10, 2016
Messages
446
Reaction score
17
First Language
French
Primarily Uses
Cam I ask for a reup?, Still looking for a way to make it done. Thanks.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
you need to explain better what you want to do, because the way described above is the usual way.
Also, adding screenshots of the events would help - but please, use [alt]-[prtscrn] for your screenshots - the screenshots you've done with [prtscrn] alone are usually almost unreadable small.
 

XGuarden

Veteran
Veteran
Joined
May 10, 2016
Messages
446
Reaction score
17
First Language
French
Primarily Uses
For be more clear.... Some time NPC follow a traceroute. While moving they need to say: get out of my way, and while they are finish it say something else. I know you will tell me many way for doing that... So I need to tell you that the way I make my game they have many way I cant use. Its must be all in same tab of the event. So I only need to find the code that told if NPC is executing a traceroute curently. Thanks =:0)
 

immatx

Veteran
Veteran
Joined
May 15, 2015
Messages
66
Reaction score
16
First Language
English
Primarily Uses
Can't you just do the normal move route but don't put 'wait for move's completion' at the end? Then add wait 1 second, then have your text? I'm not really sure why the other way doesn't work, it's how I would have tried it at first, but I think this should work fine.
 

XGuarden

Veteran
Veteran
Joined
May 10, 2016
Messages
446
Reaction score
17
First Language
French
Primarily Uses
Can't you just do the normal move route but don't put 'wait for move's completion' at the end? Then add wait 1 second, then have your text? I'm not really sure why the other way doesn't work, it's how I would have tried it at first, but I think this should work fine.
this way will not work too. its require calculation, etc... also its not dynamic. its not for a cute scene, npc actually ofthen moving on the map.
 

immatx

Veteran
Veteran
Joined
May 15, 2015
Messages
66
Reaction score
16
First Language
English
Primarily Uses
this way will not work too. its require calculation, etc... also its not dynamic. its not for a cute scene, npc actually ofthen moving on the map.
Could you describe what you actually want to happen? What I said should result in the words appearing as the npc moves, not after, so I think I misunderstood what you want.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
591
First Language
English
Primarily Uses
RMMV
Hi! This event script is for a parallel process. Increase 100 for a longer delay and adjust in other places too.
PHP:
if(this.timeOut === undefined){
  this.timeOut=0;this.msg=0;
  this.moveMessage=["Stop moving.","I said stop moving!","I hate when people are moving!","Stop it!"]
} this.timeOut++;
if(this.timeOut === 100){ this.timeOut=0;
  if($gamePlayer.isMoving()){ var ev=$gameMap._events[this._eventId];// set this to the id of the guy
     ev.turnTowardPlayer();ev.jump(0,0);ev.jump(0,0);ev.jump(0,0);
     $gameMessage.add(this.moveMessage[this.msg]);
     this.msg++; if(this.msg===this.moveMessage.length) this.msg = 0;
  }
}
 

XGuarden

Veteran
Veteran
Joined
May 10, 2016
Messages
446
Reaction score
17
First Language
French
Primarily Uses
I will try to explain it again. player ofter do moveroute without wait for completion option checked. I want that if we talk during the move route we got some text and after some other.

I already know a lot of bad way for doing that. the move route was the one at event load...
So what I want is the script that I can put inside a conditional brench that return true or false depending if the even executing a mouve route.
this logic in even:
If player_is_moving then
message A
else
message B

I know its exist a direct way for check that, I see it while ago.
thanks.
 

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,070
Members
137,577
Latest member
SadaSoda
Top