Jump to content

New Vegas Modding Support


Med111

Recommended Posts

Posted

I know, that there is already topic for modders interested in modding Sexout, but some of my issues aren't directly related to it. Also if anyone has problems with scripting in GECK, etc., go ahead and post here.

 

I learned, that inventing mod and writing scripts for it is like 5% of modding progress. Rest is basically figuring out why it's not working.

 

Does any of you know what is easiest way to get nearby actor's reference? I tried with both GetFirstRef and area effect spell, but neither is working for me. This is a big deal for me, because all scripted mechanics are useless, if I can't cast scripted effect on anyone.

Posted

I know' date=' that there is already topic for modders interested in modding Sexout, but some of my issues aren't directly related to it. Also if anyone has problems with scripting in GECK, etc., go ahead and post here.

 

I learned, that inventing mod and writing scripts for it is like 5% of modding progress. Rest is basically figuring out why it's not working.

 

Does any of you know what is easiest way to get nearby actor's reference? I tried with both GetFirstRef and area effect spell, but neither is working for me. This is a big deal for me, because all scripted mechanics are useless, if I can't cast scripted effect on anyone.

[/quote']

 

First ref should do it. I don't know why it wouldn't.

 

set target to GetFirstRef 200

then just use 'target' for whatever you need.

 

 

 

Posted

As I said before, it doesn't work. Here is exactly what I wrote:

 

ref self
set self to GetFirstRef 200

if player.GetIsSex Female && Sexout.sexyness == 100
PrintToConsole "SexoutEcounters Test Debug Mode: Requirements passed"
if self.IsInCombat && self.GetCombatTarget player
	PrintToConsole "SexoutEcounters Test Debug Mode: %n detected as enemy by scanning script" self
	if self.IsInList SexoutListBannedActor || self.GetDead || self.GetDisabled || self.GetRestrained || self.GetUnconscious || self.GetKnockedState || self.GetItemCount 00SexoutActor || self.IsChild || self.GetPlayerTeammate || self.IsSpellTarget 00SexoutEcountersCombatLock || self.IsSpellTarget 00SexoutEcountersCombatEffect

	elseif self.GetIsCreature && 0 == self.GetInFaction CentaurFaction && 0 == self.GetIsCreatureType 4 && 0 == self.GetInFaction DeathClawFaction && 0 == self.GetInFaction DogFaction && 0 == self.GetIsCreatureType 5 && 0 == self.GetInFaction SporePlantFaction && 0 == self.GetInFaction VCrCoyoteFaction && 0 == self.GetInFaction vDialogueNightkinFaction && 0 == self.GetInFaction vDialogueSuperMutantFaction

	else
		PrintToConsole "SexoutEcounters Test Debug Mode: %n is under effect of 00SexoutEcountersCombatEffect" self
		self.CIOS 00SexoutEcountersCombatEffect
	endif
endif
endif

 

Text "SexoutEcounters Test Debug Mode: Requirements passed" appears once, then nothing else happens.

Posted

Okay' date=' and I assume you've printed self and it isn't assigning properly?

What is the context of this? What is making this call?

[/quote']

 

Quest script with Begin GameMode block.

Posted

I really don't know. That works fine for me. I plopped the first few lines of that into my quest loop (Aside from the ref declaration, obviously, which is outside of the loop) and had it print some info, self as assigning just fine. Sorry..

Posted

I don't believe GetFirstRef returns the closest actor to you. It just returns the first in the cell, which I'm assuming has zero relation to where the player is. Could be closest to you, could be farthest. I could be wrong. If this is true though, you need to do a loop using GetNextRef as well to find the closest actor. Be sure to add in checks for dead and disabled actors, since they can be returned as well.

 

Edit:

Check the elder scrolls wiki for better details on how this function works. While they might not be the exact same, they usually are.

http://cs.elderscrolls.com/constwiki/index.php/GetFirstRef

The order of references as returned by GetFirst/NextRef is essentially undefined. It is not guaranteed that it will remain the same from one frame to the next. As stated above' date=' a loop should be used each time. Usually, however, the first ref is the most recently placed one. It is altogether unwise to rely on this, however.

[/quote']

Archived

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

  • Recently Browsing   0 members

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