Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

{VX}need help with npc dialog

I need a detailed explaination on how to make npc's say random dialog ,using the variables and common event,i dont get how to make it random,it keeps saying all the text instead of one random one.
 
I don't know a thing about vx, but if it's anything like XP do this.
Code:
Action Button Being Pressed

Set Variable Random 1... 5(Name it random 1-5)
Conditional Branch random 1-5
Conditional Branch Random 1-5 equal 1
Blah Blah
else
Conditional Branch Random 1-5 equal 2
Blah Blah
else
Conditional Branch Random 1-5 equal 3
Blah Blah
else
Conditional Branch Random 1-5 equal 4
Blah Blah
else
Conditional Branch Random 1-5 equal 5
Blah Blah
else
else
Should work with VX... maybe.
 

kire

Member

006":2ce07gb4 said:
I don't know a thing about vx, but if it's anything like XP do this.
Code:
Action Button Being Pressed

Set Variable Random 1... 5(Name it random 1-5)
Conditional Branch random 1-5
Conditional Branch Random 1-5 equal 1
Blah Blah
else
Conditional Branch Random 1-5 equal 2
Blah Blah
else
Conditional Branch Random 1-5 equal 3
Blah Blah
else
Conditional Branch Random 1-5 equal 4
Blah Blah
else
Conditional Branch Random 1-5 equal 5
Blah Blah
else
else
Should work with VX... maybe.

Yes it works like that on vx
But put all in separate conditional branches like:

Conditional Branch Random 1-5 equal 1
Blah Blah

else

branch end

Conditional Branch Random 1-5 equal 2
Blah Blah

else

Branch end

that way i know it works
 
Im sorry but,i just started playing VX so these terms your using are a bit hard to understand.i still cant seem to get the random chat down,and i should mention im using these on multiple NPC's,so im using common events to be called randomly.but i cant get the game to call a random common event.
 

kire

Member

Do like we've done but put like random 1 - 50 ( It will be very tough but if you want multiple NPC with a lot of random dialog, I think it's the best) and put a bit of dialog in all
 
ya it is but the point is to save alot of dialog entry later on,im going to do 5 common events with 20 dialog in each,for alot of npc's to use throughout the game,and thanks alot for being patient and helping i appriciate it :D
 

kire

Member

No problem
You can continuasly (not sure if is spelled right) change the common event for eache NPC like 1st NPC = 1st Common event, 2nd NPC = 2nd common event, that way the characters don't say all the same :P
Again no problem :thumb:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top