Jump to content

Script Help, GetContainer query


Halstrom

Recommended Posts

Posted

I have a litle dilemma, I can't seem to get the actors name from an token object carried by them.

 

I have a token with a script to calculate fertility but on the screen I get in debug messages and I can't seem to compare it to get the info read to the scanner, I got a feeling it's something to do with the Ref of the Actor or something?

 

	if iDoOnce < 1
	Set rZActor to GetContainer
	MessageEx "Preg1FertilityF %n: StartedOK" rZActor
	DebugPrint "Preg1FertilityF %n: StartedOK" rZActor
	Set fAdjFertPercFertile to (GetRandomPercent + 50) / 500
	Set fAdjFertCycleDays to (GetRandomPercent + 50) / 500
	Set fAdjFertPeakPerc to (GetRandomPercent + 50) / 500
endif
Set iDebug to 0
if SexoutPVAR.iDebug == 1
	Set iDebug to 1
elseif rZActor == SexoutPVAR.rZPlayer && SexoutPVAR.iDebug == 6
	Set iDebug to 1
elseif rZActor != SexoutPVAR.rZPlayer && SexoutPVAR.iDebug == 7
	Set iDebug to 1
endif

; *** Check Actor is Alive
if GetDead == 0
	if rZActor == SexoutPVAR.rZPlayer
		Set fLustXDrug to SexoutSQVARZPlayer.fDrugLustX
		Set fFertXDrug to SexoutSQVARZPlayer.fDrugFertX
		Set fBunXDrug to SexoutSQVARZPlayer.fDrugBunX
		Set fBunAwayDrug to SexoutSQVARZPlayer.fDrugBunAway
		Set fDrugLevelFert to SexoutSQVARZPlayer.fDrugLevelFert
	elseif rZActor == SexoutPVAR.rZCass
		Set fLustXDrug to SexoutSQVARZCass.fDrugLustX
		Set fFertXDrug to SexoutSQVARZCass.fDrugFertX
		Set fBunXDrug to SexoutSQVARZCass.fDrugBunX
		Set fBunAwayDrug to SexoutSQVARZCass.fDrugBunAway

etc

Posted
rZActor is a REF and can't be meaningfully printed like that.

thanks for the reply, is there anyway I can use the REF to get the Actors Name?

 

Posted
http://fose.silverlock.org/obse_command_doc.html is the FOSE guide.

also http://geck.bethsoft.com/index.php/Category:Scripting

Pity it isn't OBSE.

GetName would return the name of a reference but FO/FONV has no GetName I can find.

Most of the print functions seem to take floats only.

Cool, thanks, I think I have a workaround happening ok, I just thought I might be missing something basic like GetName :)

 

Archived

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

  • Recently Browsing   0 members

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