Its actually a bit complex my game because its an RPG game with dialog. I use Array slot values with assigned text for dialog… Or I use just flag variables if the entity exists in the same room… For things like Chests and loot drops of enemies i do use array values.
Dialog Text assigned into an Array
set /a spin=%random% %%7+1
if %spin% EQU 1 echo. Commander: I don’t have the money right now. But I can get it later. && sound play Comander1201.wav
if %spin% EQU 2 echo. Commander: Yikes, its that much? Can’t you give me a discount or something? && sound play Comander1202.wav
if %spin% EQU 3 echo. Commander: 150000 is a ridiculous price for replacing a damaged ship manifold. && sound play Comander1195.wav
if %spin% EQU 4 echo. Commander: 150000 credits Its an outrage. && sound play Comander1196.wav
if %spin% EQU 5 echo. Commander: I will complain to Central about this. && sound play Comander1197.wav
if %spin% EQU 6 echo. Commander: $150000 Credits? Your prices are ridiculous && sound play Comander259.wav && bg sound play 5000
if %spin% EQU 7 echo. Commander: For that price, its not worth it. && sound play Comander1198.wav
What this does is each time you run it, it will show up a different slot of
text and play the dialog audio. It just picks it at random from out of the array that’s been stored for the commander… That’s how I set up the array with the audio files for dialog. The same thing should beable to be done in the blueprints for unreal engine with the npc’s when you step inside the trigger.
Same Array Done using Multiple Party Members. Responses depend on the player’s number of visits to the area.
if %tsecv% EQU 0 set /a spin=%random% %%6+1
if %tsecv% EQU 0 if %spin% EQU 1 echo. Storm: This place is guarded. I doubt we will beable to get inside unless we
if %tsecv% EQU 0 if %spin% EQU 1 echo. have got a special security pass.
if %tsecv% EQU 0 if %spin% EQU 2 echo. Storm: Does any one here have a pass to get through the guards?
if %tsecv% EQU 0 if %spin% EQU 3 echo. Storm: Guards up ahead. Look busy people.
if %tsecv% EQU 0 if %spin% EQU 4 echo. Storm: We will need a pass.
if %tsecv% EQU 0 if %spin% EQU 5 echo. Storm: Without a pass we won’t beable to enter into the power station
if %tsecv% EQU 0 if %spin% EQU 6 echo. Storm: My pass has expired, Commander we need to get a new one.
if %tsecv% EQU 0 echo.
if %tsecv% EQU 2 echo. Commander: Let’s try to find ourselves one of those security passes. && echo.
if %tsecv% EQU 2 echo. Storm: Oh man, how are we going to get in that place. We don’t have a pass. && echo.
if %tsecv% EQU 2 echo. and that security guard aint budging from his post.
echo. && echo.
if %tsecv% EQU 3 echo. Commander: That rotten guard is now starting to now upset me. He still won’t budge.
if %tsecv% EQU 3 echo.
if %tsecv% EQU 3 if %rex% EQU 1 echo. Rex: He does his job only too well. You aint going to
if %tsecv% EQU 3 if %rex% EQU 1 echo. get in with him all hanging around if you don’t have the pass. He
if %tsecv% EQU 3 if %rex% EQU 1 echo. must beable to be distracted somehow. Just think of something
if %tsecv% EQU 3 if %rex% EQU 1 echo. commander. Entertain him or something.
if %tsecv% EQU 3 if %rex% EQU 1 echo.
if %tsecv% EQU 3 if %rex% EQU 1 echo. Commander: You must be joking me, entertain this securirty guard ?
if %tsecv% EQU 3 if %rex% EQU 1 echo.
if %tsecv% EQU 3 if %rex% EQU 1 echo. Storm: As much as I hate it. Why not do the axel in front
if %tsecv% EQU 3 if %rex% EQU 1 echo. of him that ought to move him away from his post…
if %tsecv% EQU 3 if %rex% EQU 1 echo.
if %tsecv% EQU 3 if %rex% EQU 1 echo. Rex: Ooooh our favourite Planetary greeting dance.
if %tsecv% EQU 3 if %rex% EQU 1 echo.
if %tsecv% EQU 3 if %rex% EQU 1 echo. Storm: You got to be kidding me Rex, it’s supposed to scare people away
if %tsecv% EQU 3 if %rex% EQU 1 echo. the Axel is no good for anyone. You’re not thinking right.
if %tsecv% EQU 3 if %rex% EQU 1 echo.
if %tsecv% EQU 3 if %rex% EQU 1 echo. Commander: Oh thanks a whole lot guys.
if %tsecv% EQU 3 if %loana% EQU 1 echo. Loana: Oh for pete’s sake just get on with it.
if %tsecv% EQU 3 if %loana% EQU 1 echo.
if %tsecv% EQU 3 if %rex% EQU 1 echo.
if %tsecv% EQU 3 if %rex% EQU 1 echo. Storm: No trouble. Just do the axel and this guy will be out of our
if %tsecv% EQU 3 if %rex% EQU 1 echo. way and he will be gone.
if %tsecv% EQU 3 if %rex% EQU 1 echo.
if %tsecv% EQU 3 set axsecguard1=1