Jump to content

Fallout New Vegas GECK & Scripting Help 101


Recommended Posts

Posted

I think there's a Function to get the ref of the current cell, just copy compare that against the cell name of the last time the script ran and if it's not the same run it again.

Posted

I don't know about that, I've checked both the GECK wiki and the NVSE commands list, there doesn't appear to be anything that returns a cell name. I know there's GetInSameCell which returns a 0 or a 1, previously I was using that to try and reinitialize the script, but it didn't work, probably because the NPC I was looking for was not in the same cell as the player and thus the script would get reinitialized. 

 

There's also that issue in which NPCs start equipping and unequipping their weapons, or staying still and refusing to fight. I'm guessing that's one of the problems of using AddItem, but I can't use AddItemToLeveledList, since it means breaking people's saves and my saves whenever I may want to remove something. 

Posted

GetParentCell called on a reference returns the cell they're currently located in.

ref.GetParentCell

So you should be able to do a comparison...

if (ActorREF.GetParentCell == SavedParentCellREF)
    ;do stuff
else
    ;do other stuff
endif
Posted

Thanks, sorry for asking these questions, it's just that whenever I script and things start messing up, I start losing my head over it. It's also my first time with Fallout anyway and some of the functions don't really have the names I'd have expected. 

Posted

I would have my questions concerning scanners too.

 

I'm going to optimize my scanner because even if it's working , as you say it's not a reliable solution (I found it, it was working with many other heavy mods, but when I introduced a heavy ENB the script stopped working, I assume it couldn't finish to scan in its frame. ENBs are really heavy to be handled! :-O)

 

So, to sum up:

- Actually I scan creatures and everytime it scans a creature I check many IF to see if it can become my prey.

- What you suggested me was to put it in two different stages: one stage I fill a list with all the creatures, another stage I check every element of that list with the same IFs, to see if they are possible preys. In case they are not, I remove the element from the list.

 

Now this is a solution I can understand, but ... well I never worked with lists in that way so I have many doubts

 

1 - Should I first create on GECK an empty list, call it something like MyForm, and then fill it by script? I mean one of those FLST objects?

2 - To fill a list, should I simply do MyScannedREF.ListAddReference MyForm MyIndex? But... why there's no ListRemoveReference? How am I supposed to clean the list later?

3 - To set MyIndex, should I simply have an INT which starts with 0 and I increase it by 1 everytime I add an item to the list?

4 - Bethesda guide says to use AddFormToFormList if I want the values be persistent across savegames, but... does it allow me to add MyScannedRef? or it only admits other FormLists?

5 - What is a ... NthForm? Or better, is it useful in this case?

 

------------

 

I also would like to understand how to structure that script, it's mainly a matter of concept. Putting all these conditions inside the Loop itself can lead to the script to not finish in the current frame (as I can easily see when I turn on heavy ENBs). But how checking a list is supposed to finish in the same frame? I mean I really doubt it. Let me write an example.

MY ACTUAL SCRIPT:

Label

   Scan the reference

   Check the reference

Goto until the Scan is completed

 

MY FUTURE SCRIPT

Stage 1

  Label

    Scan the reference

    Fill a list

  Goto until the Scan is completed

 

Stage 2

    Check the elements in the list

 

If my first script doesn't finish to run in a frame, I really doubt that the second one will do. Now, really, if I don't put Stage 2 in another separated script, I will have the same script as in the first case, just longer and written in a different way: how it is supposed to run better? maybe because if the script breaks it will be break when it's already outside the scan loop? Maybe because even if it will break, it will have already reduced the list of some elements, so in the next frame it will complete?

 

Or should I create a separate quest and put that Stage 2 inside that and it will be triggered when Stage 1 finishes its scan?

 

EDIT: I'm avoiding arrays for now, I'm still far away from there, I would like "not to put too much meat to cook, if I'm not starved"...

Posted

So I tried using GetParentCell to restart the quest nothing happens, I tried doing it without the start/stop quest functions, so that the script would just read the conditional I used in case there was a cell change. It didn't work, not when I moved to another cell. I've stopped the quest but I don't know how to stop it. 

 

 

The last lines are what I'm using to stop the quest and later on reinitialize it. 

 

 

 

scn PPAModDistributionQuestScript
 
ref rNPC
ref rFirstNPC
ref rContainer
ref rCurrentCell
int iDoOnce
array_var entry
array_var NPCList
 
Begin GameMode                                 ;The script below scans for NPC references, if it finds any, it adds them to the array called NPCList
 
IF (iDoOnce == 0)
        STARTQUEST PPAModDistributionQuest
        LET NPCList := ar_Construct Array  
        LET rNPC := GetFirstRef 42
        LET rFirstNPC := rNPC
        LET rCurrentCell := rNPC.GetParentCell
        MESSAGEEX "Quest Started"
 
        WHILE(IsFormValid rNPC)                                 ;Loop that adds NPCs to the array when it detects a valid NPC reference
                LET rNPC := GetNextRef
                ar_Append NPCList  rNPC
                MESSAGEEX "Added  %n"  rNPC
        LOOP           
 
 
;------------------------------------------------------------  ;The following part checks every NPC in the array mentioned earlier, the first IF checks if the reference is valid,
                                                                 ;and if the NPC has any Power Armor, if he/she does it continues onto the next IF which checks if the NPC has an armor mods
                                                                 ;finally, if that check passes, then the next group of IFs check for a faction and add a specific leveled item depending on the faction
 
 
        FOREACH entry <- NPCList                                                                                                                                 
                LET rContainer := entry[Value]
                MESSAGEEX "Checking %n" rContainer  
                IF (IsFormValid rContainer && rContainer.GetItemCount AllPowerArmor == 1 && rContainer.GetItemCount PPAPowerArmorMods == 0)
                        IF (rContainer.GetInFaction VCaesarsLegionFaction == 1)
                                rContainer.AddItem PPALegionModList 1
                                MESSAGEEX "Legion"
                        ELSEIF (rContainer.GetInFaction BrotherhoodSteelFaction == 1)
                                rContainer.AddItem PPABoSModList 1
                                MESSAGEEX "BoS 1"
                                IF (rContainer.GetItemCount ArmorPowerBrotherhoodOfSteelT51B == 1)
                                        rContainer.AddItem PPAMT51bCapAdapter 1
                                        MESSAGEEX "BoS 2"
                                ENDIF
                        ELSEIF (rContainer.GetInFaction EnclaveFaction == 1)
                                rContainer.AddItem PPAEnclaveModList 1  
                                IF (rContainer.GetItemCount ArmorPowerRemnants == 1)
                                        rContainer.AddItem PPAMAPACapAdapter 1
                                        MESSAGEEX "Enclave"
                                ENDIF
                        ELSEIF (rContainer.GetInFaction NCRFactionNV == 1)
                                rContainer.AddItem PPANCRModList 1
                                MESSAGEEX "NCR"
                        ENDIF
                ELSEIF(IsFormValid rContainer && rContainer.GetItemCount AllPowerArmor == 0)
                        rContainer.AddItem PPAArmorModDistributionBlocker 1
                        MESSAGEEX "None"
                ENDIF
        LOOP
;------------------------------------------------------ ;The script below, stops the quest, if it detects that the player has moved cell, it will reinitialize the whole script
        LET iDoOnce := 1
        STOPQUEST PPAModDistributionQuest
 
ENDIF
 
IF(rFirstNPC.GetParentCell != rCurrentCell)
                LET iDoOnce := 0
ENDIF
 
END
 

 

 

Posted

Argus:  You can post your code on here, but do so 1) in a spoiler [the exclamation icon] and 2) click the code button [<> icon] and paste it in the box -- just select auto-detect code.

Posted

So I tried using GetParentCell to restart the quest nothing happens, I tried doing it without the start/stop quest functions, so that the script would just read the conditional I used in case there was a cell change. It didn't work, not when I moved to another cell. I've stopped the quest but I don't know how to stop it. 

 

Here's what I did: 

http://pastebin.com/fayzfCPF

 

The last lines are what I'm using to stop the quest and later on reinitialize it. 

 

What about storing the player position instead the one of a scanned reference? since the scanner's depth has the player as "center". Inside doonce == 0 you store the current position, then you set doonce to 1 and you check the new position on the stage doonce == 1, in case the position changes you re-set doonce to 0 and the new position will be stored, etc. In this case you wouldn't need to start or stop the quest

Guest tomm434
Posted

How can I use the new reference I just Created in other scripts?

 

 

I place a new NPC near player in quest script

 

ref Cruck

set aamq05ghouls.Cruck to Player.PlaceAtMe aaamq05Cruck 1 1

Then I want to use Cruck in another script.

 

For example, I create additional quest after this quest and I want to give Cruck 100 caps.

So I type:

 

aamq05ghouls.Cruck.additem f 1000

And GECK says that Syntax is wrong. What can I do?

Guest tomm434
Posted

You pass him to a ref var first

 

set rRef to aamq05ghouls.cruck

rRef.additem etc.

 

Thanks

Posted

Anyone care to look at some code?  :s

 

I've used this menu structure in another script that only used one button (as opposed to multiple button vars) and checked a sub-level, and it worked fine.

 

No matter what I pick on the first menu, it always goes to the Oral menu.  The anims selected from there don't match the numbers.  For example, Button 9 ([Next]) starts animation 232.

 

 

 

scn SexoutBang2pMenuSCRIPT

int iButton
int iMenuLevel
int iMenuLevelSub
int iRand
int iMFPlayer
int iMFQPartner
ref rQPartner


;===================Need to reset for partner and partner3 vars in MQ


Begin OnAdd
	playerREF.NX_SetEVFl "Sexout:Start::CallVer" 1	
	Set iRand to GetRandomPercent
	Set rQPartner to SexoutBangMain.rPartner
	Set iMFPlayer to player.GetIsSex Female
	Set iMFQPartner to rQPartner.GetIsSex Female
	ShowMessage SexoutBang2pSelect
End	


Begin MenuMode
	Set iButton to GetButtonPressed
	if (0 == iMenuLevel) ;Select Menu for 2p
		if (-1 == iButton)
			Return
		elseif (0 == iButton)	;====================!!!!Add Strap-On during Oral Anim selection for M-F anim!!!!!!
			ShowMessage SexoutBang2pOral1
			Set iMenuLevel to 1 ;Has sub-menu
		elseif (1 == iButton)	;Missionary
			ShowMessage SexoutBang2pVagAnalMiss1
			Set iMenuLevel to 2 ;Has sub-menu
		elseif (2 == iButton)	;Doggie
			ShowMessage SexoutBang2pVagAnalDog1
			Set iMenuLevel to 3 ;Has sub-menu
		elseif (3 == iButton)	;Cowgirl
			ShowMessage SexoutBang2pVagAnalCowgirl
			Set iMenuLevel to 4 ;No sub-menu needed
		elseif (4 == iButton)	;Toys
			ShowMessage SexoutBang2pToys
			Set iMenuLevel to 5 ;No sub-menu
		elseif (5 == iButton)
			Set SexoutBangMain.i3some to 1
			RemoveMe
		endif
	elseif (1 == iMenuLevel) ;Select Menu for 2p Oral
		Call SexBangSetActorsFxnSCRIPT rQPartner iMFPlayer iMFQPartner iMenuLevel
		if (0 == iMenuLevelSub)
			if (-1 == iButton)
				Return
			elseif (0 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 201
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (1 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 202
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (2 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 203
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (3 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 231
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (4 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 232
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (5 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 233
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (6 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 234
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (7 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 235
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (8 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 236
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (9 == iButton)
				ShowMessage SexoutBang2pOral2
				Set iMenuLevelSub to 1
			endif
		elseif (1 == iMenuLevelSub)
			if (-1 == iButton)
				Return		
			elseif (0 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 237
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (1 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 238
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (2 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 239
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (3 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 241
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (4 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 242
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (5 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 243
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (6 == iButton)
				playerREF.NX_SetEVFl "Sexout:Start::anim" 401
				playerREF.CIOS SexoutBegin
				Set SexoutBangMain.iSexType to 0
				removeme
			elseif (7 == iButton)
				ShowMessage SexoutBang2pOral1
				Set iMenuLevelSub to 0
			endif
		endif	
	elseif (2 == iMenuLevel) ;Select Menu for 2p Miss
===========================ETC...

 

 

Guest tomm434
Posted

Does anyone know the reason why script doesn't work?

 

In vanilla dialogue in result script I type.

 

Startquest aamq05ghouls

Setstage aamq05Ghouls 0

set aamq05ghouls.stage to 2

 

In stage 0 I have

 

 

set aamq05ghouls.Cruck to Player.PlaceAtMe aaamq05Cruck 1 1

 

I did this with quest stage because I need to spawn him instantly, then wait for "set aamq05ghouls.stage to 2" reaction(usually a couple of seconds with default script delay)

 

The whole script is:

 

Scriptname aamq05ghoulsscript


short CruckSpawn
short CruckHelps ;1 -after player dialogue; 3 - after MQ05Completed
short GhoulNokill
short CruckDirty ; if player greeted Cruck not nice
short CruckName; player told Cruck her name
short CruckCompliment; player talked to Roy without mask
short TunnelTaftspawn - In TunnelTaft1 Ghouls spawned only once
short CruckSpeech; to tell him that time to talk is come
short Cruckfate; 1 - He stays in tunnels; 2 - he goes with player


ref Cruck
int stage

Begin gamemode

;MQ05Quest - After Tunnels
if CruckHelps ==2 && GetQuestCompleted Mq05 ==1
garzaref.removefromfaction playerfaction
AlexDargonref.removefromfaction playerfaction
DanielAgincourtref.removefromfaction playerfaction
DoctorLIref.removefromfaction playerfaction
set CruckHelps to 3
endif





if stage ==2; After Li dialogue
setAlly aaamq05ghoulfaction FeralGhoulFaction 1 1
setAlly aaamq05ghoulfaction BrotherhoodSteelFaction 1 1
setAlly aaamq05ghoulfaction BrotherhoodSteelFactionDC 1 1
Cruck.startconversation player 11aamq05ghoulsCruck

set stage to 0
endif

if stage ==3; Player offences Cruck
stopquest aamq05ghouls
player.kill
endif

If stage ==4
;Cruck decides to help player
;Sciencist added to player faction
garzaref.addtofaction playerfaction 1
AlexDargonref.addtofaction playerfaction 1
DanielAgincourtref.addtofaction playerfaction 1
DoctorLIref.addtofaction playerfaction 1
;Set agression
garzaref.setav aggression 0
AlexDargonref.setav aggression 0
DanielAgincourtref.setav aggression 0
DoctorLIref.setav aggression 0
garzaref.setav confidence 4
AlexDargonref.setav confidence 4
DanielAgincourtref.setav confidence 4
DoctorLIref.setav confidence 4
;Spawn ghouls and Set Cruck health
set aamq05ghouls.CruckHelps to 1
Cruck.setav health 500
Cruck.setav aggression 0
Cruck.equipitem ms12GhoulMask 0 0
Cruck.evp
player.kill
endif


if Cruckspeech ==1
Cruck.sayto player 11aam05ghoulsCruckConv
set Cruckspeech to 2
endif


if Cruckhelps ==1 && TunnelTaftspawn ==0 && GetStage Mq05 ==100
mq05TaftStairAmbushEnclave01.placeatme aaamq05ghoultrooper 6
set TunnelTaftspawn to 1
if GhoulNokill ==1
setessential mq05TaftStairAmbushEnclave 1
endif
endif

if MQ05TaftEnclaveVictim.getdead ==1 && Cruckspeech ==2 && GhoulNokill ==1
Cruck.say 11aam05ghoulsCruckConv
set Cruckspeech to 3
endif


if TaftCheckpointDoor.getOpenState == 1 || TaftCheckpointDoor.getOpenState == 2
Cruck.startconversation player 11aamq05ghoulsCruck6
endif

if Cruckfate ==1
Cruck.evp
endif

end

 

 

 

 

After dialogue with Cruck(which starts after "Stage ==2") in "Result Script" I type "Set aamq05ghouls.stage to 4"

 

 

And nothing happens!(Sciencist are not added to player faction and Cruck doesn't equip mask which he should equip - he has it in his inventory and  he did it before)

 

And funny thing is - after vanilla dialogue( where I set stage to 2)- everything works(Conversation with Cruck starts).

All result scripts in conversation works(I tried typing player.kill to result script and it worked)

And stage 4 worked before, I don't know what I did to spoil it.

 

 

 

Ps. Stage 3 doesn't work too.

Posted

>>>>set aamq05ghouls.Cruck to Player.PlaceAtMe aaamq05Cruck 1 1

 

First of all, there's no Cruck variable in your Quest.  Second, I don't know that that would work anyway.  I'm guessing that you're trying to set his reference?

 

I suggest setting Cruck to initially disabled (the Edit menu that you find in the window that shows you every item that's in a loaded cell when you right-click on an item/NPC).  On that same Edit window, make sure that you've set the Reference Name for Cruck.  That way, you'll know his reference and won't have to assign it unless you have some other script where you have to GetSelf (which sets the ref for you anyway).

 

So instead, I would suggest that you move the Cruck's placement into the cell where the NPC is that the Player has to talk to (or right outside of it to have him run in case the player is looking in his direction so s/he won't see him spawn) and then give him a StartConversation package targeting the player.  Use a var in your quest script as a condition on it to make sure that the package only executes once.  You can set it to 1 in the EndScript of the package.

Posted

RE:  My menu issue...

 

My quest has a .25 delay since it's hotkey based (SexKey/Rape Game++).  Adding a Stage variable allows the correct menu to be selected (Sex Type -> Position Options) when initiated with 2p (or it did before I added the Stage2 to try to rectify it not making the right selection after that).  It doesn't work from there, so there must be something going on with the script getting interrupted, which doesn't really make sense to me since once the character type has been determined, an OnAdd item script (an example shown in my previous post) should take the rest of it (with the exception of the UDF inside of the scripts for people).

 

The script worked previously with Deathclaws and Cazadors (haven't tested since trying to add stages, but obviously they are short enough to process), but isn't working with people, which have the extensive menus.

 

 

 

scn SexoutBangQuestSCRIPT

;36  J
;37  K
;38  L
; .25 proc
;Maybe Later - Check and Equip SexoutSFLVendorToysStrapOns
;Maybe Later - Check and Equip SexoutSLClothTypeStrapon


ref rPartner
ref rPartner3
int iEnableNonCon
int iUseStrapOnOnGuy
int iAUsedStrapOn
int iCUsedStrapOn
int iConSex
int iNonConSexPlayer
int iNonConSexNPC
int iSexType	; 1 = Con, 2 = NonConPl, 3 = NonConNPC
int iSexType3	; 1 = Con, 2 = NonConPl, 3 = NonConNPC
int iDoOnce
int iCreatureType
int i3some
int iStage




Begin GameMode

		if (GetGameRestarted || GetGameLoaded)
			if ListGetFormIndex SexoutNGFLGlobalCBEndFLV SexoutBangUnequipStrapOnSPELL < 0
				ListAddForm SexoutNGFLGlobalCBStartS SexoutBangUnequipStrapOnSPELL 
			endif
			if ListGetFormIndex SexoutNGFLGlobalCBEndFLO SexoutBangUnequipStrapOnSPELL < 0
				ListAddForm SexoutNGFLGlobalCBStartS SexoutBangUnequipStrapOnSPELL 
			endif
			if ListGetFormIndex SexoutNGFLGlobalCBEndFLA SexoutBangUnequipStrapOnSPELL < 0
				ListAddForm SexoutNGFLGlobalCBStartS SexoutBangUnequipStrapOnSPELL 
			endif
		endif

;For testing only
	if (0 == iDoOnce)
		set iConSex to 36	;J
		set iNonConSexPlayer to 37	;K
		set iNonConSexNPC to 38	;L
		set iUseStrapOnOnGuy to 1
		set iEnableNonCon to 1
		set iDoOnce to 1
	endif
	
	if (0 == iStage)
;		Call iConSex iNonConSexPlayer iNonConSexNPC
		if IsKeyPressed iConSex
			if (0 == i3some)
				Set rPartner to GetCrosshairRef
				Set iSexType to 1
				Set iStage to 1
			else	;Player has already selected parnter 1
				Set rPartner3 to GetCrosshairRef
				Set iSexType3 to 1
				Set iStage to 1
			endif
		elseif (iEnableNonCon && IsKeyPressed iNonConSexPlayer)
			if (0 == i3some)
				Set rPartner to GetCrosshairRef
				Set iSexType to 2
				Set iStage to 1
			else	;Player has already selected parnter 1
	;===============Need to check if raper has already been set		
				Set rPartner3 to GetCrosshairRef
				Set iSexType3 to 2
				Set iStage to 1				
			endif		
		elseif (iEnableNonCon && IsKeyPressed iNonConSexNPC)
			if (0 == i3some)
				Set rPartner to GetCrosshairRef
				Set iSexType to 3
				Set iStage to 1				
			else	;Player has already selected parnter 1
	;===============Need to check if raper has already been set		
				Set rPartner3 to GetCrosshairRef
				Set iSexType3 to 3
				Set iStage to 1
			endif	
		endif
	elseif (iStage == 1)
		if (iSexType && (0 == rPartner.GetDead))
		
			if (rPartner.GetIsCreature)
				if (0 < (NX_IsInList SexoutCListFeralGhoul rPartner))
					player.additem SexoutBangFeralGhoulMenu 1 1
					Set iStage to 3					
				elseif (0 < (NX_IsInList SexoutCListDeathclaw rPartner))
					player.additem SexoutBangDeathclawMenu 1 1
					Set iStage to 3					
				elseif (0 < (NX_IsInList SexoutCListDog rPartner))		
					player.additem SexoutBangDogMenu 1 1
					Set iStage to 3					
				elseif (0 < (NX_IsInList SexoutCListSporePlant rPartner))
					player.additem SexoutBangSporeMenu 1 1
					Set iStage to 3					
				elseif (0 < (NX_IsInList SexoutCListSupermutant rPartner))
					player.additem SexoutBangSuperMutantMenu 1 1
					Set iStage to 3					
				elseif (0 < (NX_IsInList SexoutCListCentaur rPartner))
					Set iCreatureType to 1	;Need to clear this in menu script before/after cios
					player.additem SexoutBangMiscCreMenu 1 1
					Set iStage to 3					
				elseif (0 < (NX_IsInList SexoutCListBloatfly rPartner))
					Set iCreatureType to 2	;Need to clear this in menu script before/after cios			
					player.additem SexoutBangMiscCreMenu 1 1
					Set iStage to 3					
				elseif (0 < (NX_IsInList SexoutCListLurkKing rPartner))
					Set iCreatureType to 3	;Need to clear this in menu script before/after cios			
					player.additem SexoutBangMiscCreMenu 1 1
					Set iStage to 3					
				elseif (0 < (NX_IsInList SexoutCListNightStalker rPartner))
					Set iCreatureType to 4	;Need to clear this in menu script before/after cios			
					player.additem SexoutBangMiscCreMenu 1 1
					Set iStage to 3					
				elseif ((0 < (NX_IsInList SexoutCListScorp rPartner)) || (0 < (NX_IsInList SexoutCListRadRoach rPartner)) || (0 < (NX_IsInList SexoutCListMoleRat rPartner)) || (0 < (NX_IsInList SexoutCListGiantRat rPartner)) || (0 < (NX_IsInList SexoutCListNightStalker rPartner)) || (0 < (NX_IsInList SexoutCListMantis rPartner)))
					Set iCreatureType to 1	;Need to clear this in menu script before/after cios
					player.additem SexoutBangDogMenu 1 1
					Set iStage to 3
				else  ;Currently, Ant, Cazador, Gecko, and Bighorner only have 1 anim each
					playerREF.NX_SetEVFl "Sexout:Start::CallVer" 1
					playerREF.NX_SetEVFo "Sexout:Start::ActorA" rPartner
					playerREF.NX_SetEVFo "Sexout:Start::ActorB" playerREF
					if (2 == iSexType)
						playerREF.NX_SetEVFo "Sexout:Start::raper" playerREF
					elseif (3 == iSexType)
						playerREF.NX_SetEVFo "Sexout:Start::raper" rPartner
					endif	
					playerREF.CIOS SexoutBegin
					Set iSexType to 0
					Set iStage to 3
				endif
			else
				Set iStage to 2
		endif
	elseif (iStage == 2)
		if (iSexType && (0 == rPartner.GetDead))	
				if (0 == i3some)
					player.additem SexoutBang2PeopleMenu 1 1
					Set iStage to 3
				elseif (i3some && (0 == rPartner3.GetDead))
	;=====================Need to figure out how to clear 3som var if target = dead?			
					player.additem SexoutBang3PeopleMenu 1 1	
					Set iStage to 3
				endif
			endif
		endif
	endif
end

 

 

Posted

@tomm434:  A.J. pointed out to me that apparently I missed the ref Cruck in your script (*head->desk*).  I'm just going to go sit over here now. ->

Posted

@nyaallich

Just out of curiosity, which menumode type are you running that menu options script in? Most examples of tiered menu systems seem to use gamemode as the default for catching the getbuttonpresseds, and I have a hunch - not that they're worth much today - that, the messagebox itself also being a menumode, that could be getting tangled up. So maybe try specifying the menumode type in the block (1009 for dialog, 1002 for inventory etc) so that the messagebox interrupts it.

Posted

Cipsis had the button catches in the MenuMode block, and like I said, it worked on a long menu message sequence in another mod.  Not that that matters.  It just confuses me.

 

It's a menu that pops-up like with Preg's medical scanner.  So without opening Preg to check if it states it, I'd guess it's 1001. 

Posted

I think from memory the medical scanner script may be in SCR still as it wasn't meant to be just a Pregnancy scanner, it also scans drugs too.

Posted

Godamnit.  Or maybe I'm an idiot who's getting mods stuff into a jumble of "what am I supposed to use where" mental stew.

Posted

The scanner uses MenuMode.  /Trivia

 

EDIT:  I'm not sure exactly what the difference is with using GameMode and MenuMode to handle menus.  GameMode ended up being what I needed.  Unlike GameMode, in my other script that MenuMode, MenuMode works without the Returns.

Guest tomm434
Posted

@tomm434:  A.J. pointed out to me that apparently I missed the ref Cruck in your script (*head->desk*).  I'm just going to go sit over here now. ->

 

I understand that I need to put him somewhere in GECK and give him ReferenceID. I'll try to do it and see if this solves the whole problem with script.

Posted

The scanner uses MenuMode.  /Trivia

 

EDIT:  I'm not sure exactly what the difference is with using GameMode and MenuMode to handle menus.  GameMode ended up being what I needed.  Unlike GameMode, in my other script that MenuMode, MenuMode works without the Returns.

Menumode blocks only run when the game is paused and in menu mode (pip boy open, conversation dialogs showing, etc). Gamemode blocks only run when the game is running and the clock isn't paused.

 

So you can't use a gamemode block to catch events and such when a menu is being shown, and you can't use a menumode block to catch events that happen when the game is actually running.

 

Sometimes you need a mix of both. The stupid sexout thing to get the last conversation partner to check that a dialog callback has fired works like that. It can only do the checks in gamemode, but the only time it can get the current conversation partner is during dialog -- menu mode.

 

So every time it goes into a conversation menu it starts saving the current dialog partner to a quest variable that the gamemode block can then compare against the value in the dialog reference value.

 

There's no blocktype that runs in both modes.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...