Potatos Flashing Light
I'm trying to get Potatos' light to flash while she speaks. I remember I read an older post where someone asked this, and someone replied that it was done with scripts. So which scripts make Potatos' light flash while she talks, and where do I find them?
[your output] > [some random entity] > RunScriptCode > GetPlayer().TurnOnPotatos()
Replace TurnOnPotatos with TurnOffPotatos to turn it off.
FelixGriffin wrote:
You can call the script functions easily from Hammer like this:[your output] > [some random entity] > RunScriptCode > GetPlayer().TurnOnPotatos()
Replace TurnOnPotatos with TurnOffPotatos to turn it off.
I'm a little lost here. Just as an example:
[entity:prop_button]OnPressed > [logic_script here] > RunScriptCode > ???
So what exactly am I doing with GetPlayer ().TurnOnPotatos ()?
Also, I've been reading some of the scripts for Potatos talking in the vscripts folder. Some even have a manual at the beginning to show what the script is telling the game to do, but nothing looks like it's triggering her light.
If you want a button to flash the light when pressed, do it like this:
Output: OnPressed
Target: [can be anything you like, perhaps @glados would be fitting]
Input : RunScriptCode
Param : GetPlayer().TurnOnPotatos()
That will turn on the light.
I'll also try using choreo scenes when I get back to my computer.
Dr.Toaster Waffles wrote:
I'll also try using choreo scenes when I get back to my computer.
If you have custom audio for GLaDOS to 'flash talk', unfortunately that may be impossible without creating a whole new mod.
Dr.Toaster Waffles wrote:
Wait... are you saying I have to create my own "flash talk" for it to work? Because I barely know a thing about scripting and I'm certainly not making a mod. (at least for now.)
If you are wanting to use already included audio in Portal 2 you are fine. But what I'm saying is if you have a custom voice actor to say a line like "I like toasty Waffles" - it would be impossible without a scene - because it is impossible to recompile scenes.image with your custom scene included. Unless of course the new update changes this.
OnPressed
[logic_choreographed_scene]
Start
When I stepped on the button in-game, her light didn't flash and the line didn't play. The sound was in Raw format, which for some reason plays all the music but never plays character lines. Game Sounds for me doesn't play either music or lines, and Scenes doesn't play either character lines or music too.
Then I did everything you said to do for triggering a light flash with GetPlayer().TurnOnPotatos(), but that didn't work either.
I still need help with sounds, though. This has been an ongoing problem where neither my sound browser or game will play any voice lines.
FelixGriffin wrote:
That's a bug in Hammer. Go to ThePortalWiki's page of GLaDOS voice lines, find one you like, and mouse over the Download link to see the filename. The scene name will be almost the same as that.
So I have to download the line I want and put it in Hammer? Then I pakrat it into the file for sharing?
EDIT: Or are you saying I can preview them from there? Well, that's helpful, but Hammer won't either let me preview the sounds, nor will it play them in-game. At least Potatos wouldn't play ingame.
EDIT: I just tried a normal GLaDOS line and it played. The extremely freaky part was that I had a Potatos gun and her light WAS STILL SYNCHED to GLaDOS.
EDIT: Just tried a Potato line and it worked. I guess some of her lines are broken, then.
Anyways, thanks for the help. 