The forum has been set to read-only mode. For community discussion and questions, head over to our Discord: https://discord.taleoftwowastelands.com

NPC turning on a Juke Box

General mod discussion and requests.
H1ms3lf
Posts: 146
Joined: Tue Apr 11, 2017 8:44 pm

NPC turning on a Juke Box

Post by H1ms3lf » Mon Jun 05, 2017 2:05 am

Heya!!



Almost done with re-introducing the missing NPCs at players Vault 101 Birthday party (plus extra dialogues :D), just doing some final touches.


Running into an issue that's probably something simple, but my researching and poking around has led me nowhere =XX



I've placed a working Juke Box in the room, made it persistent, and player can turn it on/off (plays Vault 101 radio). However, I need Amata to turn it on/off. Tried to make her activate it through a "Use Item At" package, but no luck so far.


Is there any specific procedure or script commands to make her being able to turn the Juke Box on ?



Thanks in advance!! =)


Compulsive post editor and CEO for the ENDLESS WAVES OF BAD DOGGIE!!

Currently trying to get the FWE Wasteland Explorer bike to work in TTW =X



User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

It's not an item, it's an

Post by RoyBatty » Mon Jun 05, 2017 4:08 am

It's not an item, it's an activator, and I don't think there is an idle animation for doing that. Might be one in a modders resource somewhere though.


You can always fake it.


Image

H1ms3lf
Posts: 146
Joined: Tue Apr 11, 2017 8:44 pm

RoyBatty wrote:

Post by H1ms3lf » Mon Jun 05, 2017 8:40 am

[quote=RoyBatty]


It's not an item, it's an activator, and I don't think there is an idle animation for doing that. Might be one in a modders resource somewhere though.


You can always fake it.[/quote]



Through a configuration of that package, she gets near the Juke Box and moves her hand towards it, that works for the animation, but I can try improving it further.


The thing is about turning it on... I can't seem to find a script or manner of making the Jukebox start playing ("as if" the player had activated it =X). If it's not asking too much, could you or somebody point me the right functions/commands? Or give an in-game example of how it is done so I can learn from.


Compulsive post editor and CEO for the ENDLESS WAVES OF BAD DOGGIE!!

Currently trying to get the FWE Wasteland Explorer bike to work in TTW =X



User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

Add to her script jukeboxref

Post by RoyBatty » Mon Jun 05, 2017 3:23 pm

Add to her script jukeboxref.activate


Image

H1ms3lf
Posts: 146
Joined: Tue Apr 11, 2017 8:44 pm

I think I had already tried

Post by H1ms3lf » Mon Jun 05, 2017 8:10 pm

I think I had already tried that command via console and it returned an error, inserting it on a script doesn't compile...



[url=https://postimg.org/image/gzl1eg8o1/][img]https://s24.postimg.org/gzl1eg8o1/Sem_t_tulo.jpg[/img][/url]



Here is the item just in case, appears to work fine in-game when player turns it on/off.



[url=https://postimg.org/image/kdhcmip63/][img]https://s17.postimg.org/kdhcmip63/Sem_t_tulo.jpg[/img][/url]


Compulsive post editor and CEO for the ENDLESS WAVES OF BAD DOGGIE!!

Currently trying to get the FWE Wasteland Explorer bike to work in TTW =X



User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

The placed world item needs

Post by RoyBatty » Mon Jun 05, 2017 11:19 pm

The placed world item needs to be named CG02jukeboxREF , the white box on the top when you edit the reference (not the base form).


Image

H1ms3lf
Posts: 146
Joined: Tue Apr 11, 2017 8:44 pm

You mean the "Reference

Post by H1ms3lf » Tue Jun 06, 2017 12:25 am

You mean the "Reference Editor ID", right?



Okay, it now compiles, but...... Juke Box still won't play xD

Tried placing on the quest script, under a new variable so I can keep resetting via console to try again, shouldn't work differently from a "NPC script" I assume?¿



I can also select the Juke (left click) in the console during gameplay and type "activate", but it won't play via command, only if activated by player input.

(EDIT: Also tried starting a new game to make sure it wasn't related to my saves ^^)


Thanks for bearing with me Roy! Don't give up!!


Compulsive post editor and CEO for the ENDLESS WAVES OF BAD DOGGIE!!

Currently trying to get the FWE Wasteland Explorer bike to work in TTW =X



User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

hrm weird, I'd have to set

Post by RoyBatty » Tue Jun 06, 2017 11:34 pm

hrm weird, I'd have to set something up and see if it works.


Image

Mystical Panda
Posts: 750
Joined: Wed Mar 30, 2016 2:02 pm

I wonder if NPCS actually

Post by Mystical Panda » Wed Jun 07, 2017 12:07 am

I wonder if NPCS actually activate "activators" or if Beth fakes it in script? By giving them a "go to" marker in the CK, tell them to "go to marker", then trigger an animation once they reach it. I've never really looked to be honest. From a programming point of view, having them use a activator would seem the more difficult to program onset wise, but later, more flexible and easier to script for.



User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

Radios are activators, so

Post by RoyBatty » Wed Jun 07, 2017 12:09 am

Radios are activators, so activating them via script should work. You could try player.activate refid.


Image

Post Reply