Guest marieruth Posted August 23, 2014 Posted August 23, 2014 I'm making an object that's activated and it is supposed to function similar to how a water pump work (you activate it, the HUD goes away, the camera moves downward slightly, and then the slurping sound plays, etc.) and I am wondering if there's a way I could be able to get the HUD and camera to move through script? The other parts I don't have an issue with, but it's just those two things I'm unsure of how to approach. The activator is simply supposed to fill up coffee mugs. I pretty much know what I'm going to do with everything else but the camera and HUD stuff as I said already..
DoctaSax Posted August 23, 2014 Posted August 23, 2014 I'd say have a look at con_togglemenus and disableplayercontrols. Better still, have a look at the vanilla activator scripts that do the same thing you want.
Guest marieruth Posted August 23, 2014 Posted August 23, 2014 I'd say have a look at con_togglemenus and disableplayercontrols. Better still, have a look at the vanilla activator scripts that do the same thing you want. Well, I looked at both of the scripts for the water pumps, and I couldn't find anything that was specific to the player controls being disabled, or the camera moving, and the only other water pump that didn't have a script to it just had the type of water selected in the Activator window. I'm guessing the pump stuff is hardcoded, but I just was hoping I could recreate it through script. The disableplayercontrols thing would work and even though I try to avoid requiriing NVSE, I'll definitely take a look at the con_togglemenus thing. Thanks for your response. Pump scripts: scn VFSWaterPumpSCRIPT int iPumpStatus ; 0 = pay to use, 1 = no charge after Bill Ronte is sober int iPaid ; 0 = hasn't paid, 1 = player paid to drink int iPayment ; 0 = hasn't asked about payment, 1 = regular price, 2 = discounted price begin onActivate if iPaid >= 1 && iPumpStatus != 1 activate VFSWaterPumpREF.setownership KingsFaction set VFSWaterPumpREF.iPaid to 0 else activate endif end scn VFSWaterPumpBarkSCRIPT begin onTriggerEnter player if VFSWaterPumpREF.iPumpStatus == 0 VFSWaterPumpGuard1REF.SayTo player VFSWaterPumpBark else endif end
Guest tomm434 Posted August 23, 2014 Posted August 23, 2014 Maybe that's something connected with "Activate"? It is universal command for everything and it can start the animation. So maybe you can create a quest with a time which will for disable player controls for 2 seconds and then enable them. But also there is a chance that disable player controls won't work good with animations - now for example if you try to disable player controls when player is knocked down, you'll get issues. You can try at least.
Guest Posted August 23, 2014 Posted August 23, 2014 The water pump doesn't need a script to work, the one you linked is a peculiar case and the script has other purposes. They never disable my controls nor my hud, they simply plays an animation on my character, like sinks, hydrants, toilets etc. It's the animation that somewhat overwrites your controls. I can't find where it specifically says to play that certain animation, it's different from furnitures. It's not on the nif, it could be hardcoded as you say. Best deal? if you like the water pump animation for your purpose, just create a new ID from the water pump (not the scripted one you linked above, pick a generic one) and then replace the nif like for example with the coffee brewer... then add a script to fill your mug
DoctaSax Posted August 23, 2014 Posted August 23, 2014 The anims are actually picked by the idle manager, based on conditions there. If you look inside Gameplay\IdleAnimations you'll see under "ActivateIdles", the condition "GetUsedItemActivate == 1, and under "ActWaterSource" the condition "IsWaterObject == 1". The actual anims then have the Is1stPerson check to distinguish between the 1st & 3rd person anim. To make the ActWaterSource condition stick, you'll see the actual activators have a "water type" selected, so a basic copy of one of them should trigger the right conditions. None of it is based on scripting apparently.
Guest Posted August 24, 2014 Posted August 24, 2014 The anims are actually picked by the idle manager, based on conditions there. I thought about that but didn't check it. Now that's pretty interesting.
Guest marieruth Posted August 24, 2014 Posted August 24, 2014 The anims are actually picked by the idle manager, based on conditions there. If you look inside Gameplay\IdleAnimations you'll see under "ActivateIdles", the condition "GetUsedItemActivate == 1, and under "ActWaterSource" the condition "IsWaterObject == 1". The actual anims then have the Is1stPerson check to distinguish between the 1st & 3rd person anim. To make the ActWaterSource condition stick, you'll see the actual activators have a "water type" selected, so a basic copy of one of them should trigger the right conditions. None of it is based on scripting apparently. I tried that and it seemed to not work for me. I changed the ID of an existing water type, created a new form with that ID, and removed the spell effect of the water healing. I tried looking for a form list of some sort that had the water objects, but I could not find any unfortunately. And when I tested it in New Vegas, there was no animation playing. I am not sure if I needed the water healing effects in order to get the animation to play, but I don't want it to heal when the urn is activated. I can't seem to find a way to get the new water type to be identified as a water object. I'm not really sure what to do.
Guest Posted August 24, 2014 Posted August 24, 2014 Oh ignore the water source, use GetIsUsedItem as condition for your custom activator, I just tried it and it works, wohoo!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.