Split Second While Pip-boy Is Being Lowered After Use

Post » Tue Aug 31, 2010 5:18 pm

Player is farting around with his inventory.

Then, he lowers his pipboy.

You see the view where the arm is tilting away, the pip boy is going down. It happens only for a fraction of a second, and then it's done.

.... but I kinda want to detect when that is happening, because I've found its possible to crash the game if you cause dialogue to happen at that exact moment in time. Specifically, its a talkingactivator, but anyway.

I wanna detect that split second where the pip boy is tilting away from the player, and it is happening in gamemode, I know its gamemode because I have other functions which are kicking in at the same time, and they are gamemode-only.
User avatar
Albert Wesker
 
Posts: 3499
Joined: Fri May 11, 2007 11:17 pm

Post » Tue Aug 31, 2010 11:23 pm

Use a token on the player like this. I used a quest variable in case you need to access it from another script.

Begin MenuMode 1002set MyQuest.halt to 1EndBegin GameModeif MyQuest.halt == 1   ;player is lowering the pipboy   ;run a timer of maybe 1 second, then set halt to 0   ;then whatever you are doing can have the condition of if MyQuest.halt == 0endifEnd

User avatar
Cartoon
 
Posts: 3350
Joined: Mon Jun 25, 2007 4:31 pm

Post » Tue Aug 31, 2010 8:15 am

Ohh I see.

One can detect the pip boy itself with special menu modes and potentially keep track of it.

1002 = Inventory
1003 = Stats
1023 = Pipboy Data
1035 = Pipboy Repair

Alright thx for the strategy! I already have an item which lives in the player inventory which infact I could use to keep an eye on this, and it's great that it doesn't need to run in gamemode (which is when the game is at its busiest). I could have menumode blocks for each of these things and have them feed into the quest script that it works with already, So, that's hella convenient and good. I will see how this goes!
User avatar
Louise
 
Posts: 3407
Joined: Wed Nov 01, 2006 1:06 pm

Post » Tue Aug 31, 2010 11:25 pm

Hehe, this is SO working.

begin MENUMODE 1002
set PhalanxIntercomQuest.RecentPipUse to 1
end

begin MENUMODE 1003
set PhalanxIntercomQuest.RecentPipUse to 1
end

begin MENUMODE 1023
set PhalanxIntercomQuest.RecentPipUse to 1
end

begin MENUMODE 1035
set PhalanxIntercomQuest.RecentPipUse to 1
end


It was really that easy. A quest thats running on a lazy 5 second timer swaps it back to zero on each pass, and life goes on. I refuse to do the crash-sensitive operations while that var is a 1. And that's it.
User avatar
Stace
 
Posts: 3455
Joined: Sun Jun 18, 2006 2:52 pm

Post » Tue Aug 31, 2010 12:07 pm

I believe this should take care of the same:
begin MENUMODE 1	set PhalanxIntercomQuest.RecentPipUse to 1end


EDIT:
For a second I was thinking it would be simpler to just wrap the scripts you're concerned about with:
if MenuMode 1 == 0	; do stuffendif

...but... um... no, that won't work :P
User avatar
Adam Porter
 
Posts: 3532
Joined: Sat Jun 02, 2007 10:47 am

Post » Tue Aug 31, 2010 9:14 am

It won't make any noticeable difference, but this would be more efficient than setting the variable every frame in the correct MenuMode:
Begin MenuMode 1	if PhalanxIntercomQuest.RecentPipUse	else		set PhalanxIntercomQuest.RecentPipUse to 1	endifEnd

Cipscis
User avatar
electro_fantics
 
Posts: 3448
Joined: Fri Mar 30, 2007 11:50 pm


Return to Fallout 3