Jump to content

Geck/Scripting Help thread ( imod question )


Guest user29

Recommended Posts

Guest user29
Posted

New one, Anyone know if an imod that's timed like a fade in from black automatically deletes itself or should i still be calling rimod. I just doesn't want to save bloat. It'd be a pain to rimod in this case, so if it's avoidable I just wanted to double check.

Posted

May want to try calling MatchRace with NPCRef.GetBaseObject. It could require a base id and not a simple reference id.

Guest user29
Posted

I wasn't using a reference. I was using an actor ID. I might try a reference though.

Posted

If this works, you should probably also do the same thing in reverse, to store the pc's race on an npc you put in a dummy cell to be able to revert back to it.

Guest user29
Posted

I'm just going to have flashing lights and sirens going off plus a way to opt out before I force it on the character.

 

So the reference worked. Sorta. I got some odd results. I have a spore carrier custom race reference. Well I try to match it with

 

player.matchrace presetreference

 

and it just changes my race to Caucasian. Most of the time. One time it changed me to Caucasian child. Hope you can help me out.

 

edit: nevermind, by getting rid of the older and younger race from my custom race it swaps correctly now.

Guest user29
Posted

All right, got matchrace working really well last night thanks to you guys, now what I'm doing is trying to play the "glowing one" magic effect on the player. 

 

Well it works well inside, like perfectly really. But If I go outside the effect turns white after I move around for a few seconds. If I stay still it plays correctly. Any ideas at all? Can provide more information if you need it.

Posted

Changing race, when it works, revert to default hair/eyes! And the function to set eyes or hair never worked.

 

Guest user29
Posted

Changing race, when it works, revert to default hair/eyes! And the function to set eyes or hair never worked.

 

I'm onto the next problem :P

Posted

Sorry did not read the full topic before answering   :blush: . Still revertig back the player might be difficult...

Posted

Sorry did not read the full topic before answering   :blush: . Still revertig back the player might be difficult...

Often when mutated by aliens/radiation/whatever there is no going back :)

Guest user29
Posted

yeah I'm not so worried about changing the player back unlike the other changes.

 

 


All right, got matchrace working really well last night thanks to you guys, now what I'm doing is trying to play the "glowing one" magic effect on the player. 

 

Well it works well inside, like perfectly really. But If I go outside the effect turns white after I move around for a few seconds. If I stay still it plays correctly. Any ideas at all? Can provide more information if you need it.

 
Still need help with this.

 

Guest user29
Posted

I sorta figured it out. Whenever the player enters a new world cell the effect turns white. Dunno if there's any way to fix it. Could be an effect setting but I've got no idea. Can you detect when the player enters a new exterior cell? And by that I mean how the world is actually made out of a bunch of exterior cells that are linked together. Not talking about going from an interior to exterior.

Posted

I can't see any function to get the current cell to compare it for change, I suspect IsInterior is all you got, not sure if it works for NPC's. It doesn't happen going from one interior cell to another?

Posted

I was gonna suggest running GetInSameCell on an actor that follows you around, but then ran into GetParentCell in the NVSE function list. If it works as it did in Oblivion, that'd be what you're looking for.

Never mind about that example script using a global, just use a quest var. You'd have to run it pretty often, but in this case there's probably no need to use the kind of quest delay time they suggest either.

Guest user29
Posted

That did it. I'm running it in a quest script that runs every .001 seconds (was using it to update the lights that follow the player around) and it blinks white for a fraction of a second but it's hard to even notice. Thanks for the help.

 

 

index.php?app=core&module=attach&section

:P

 

  • 1 month later...
Guest user29
Posted

All right, I don't think this one's too hard either (usually they're not, I just haven't used the function that's needed so here goes)

 

All I want to do is close the pipboy. I have things that I want to occur as soon as they're triggered from the menu, but I find it waits for the pipboy to close. Surely there's a way to have that same thing just immediately close the pipboy on the player, yes?

Posted

May want to try something like this:

SCN CloseThePipBoyQuestScript
 
int iKey
 
Begin MenuMode 1
   ;use a quest variable or global as a control boolean
   ;keep it at 0 til you need pipboy closed, then set to 1
   if 1 == QuestREF.ClosePipBoyVariable 
      set iKey to GetControl 14 ;get the key code currently assigned to opening the pipboy
      TapKey iKey
   endif
End; MenuMode 1

Now, control code 14 is for "Menu Mode" but I didn't see any other controls that were close to being the Pipboy.

If this control code is not what you want, then you can always set iKey to 15 (TAB key) instead.

 

EDIT: Heh... alternatively you could put the code you want to run while the pipboy is still open in a "Begin MenuMode 1" block ;)

Guest user29
Posted

Gah, I always forget about TapKey. What's going on is I have an ingestible I want to close the pipboy when the player consumes it, so I think all I need is this in the effect script of the item.

 

set iKey to GetControl 14
TapKey iKey
Posted

You should check if the pipboy's open first though with one of the menumode functions. Someone could 'eat' the ingestible through a hotkey.

Guest user29
Posted

ah good idea. So a 

If (MenuMode 1)
 ;code goes here
endif

 

will top it off. Thanks.

  • 5 months later...
Posted

New one, I believe I recall pride telling me that you can stop a sex act before it's normally suppose to stop. Does anyone know the function to do this, and how to use it?

Posted

ah, thank you. It's SexoutNGFinishNow

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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