Jump to content

Get Container, Actors name not displaying in Object script


Halstrom

Recommended Posts

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

Link to comment

When I am debugging references, I always like displaying both the numeric form of the reference and the name.

 

For example:

 

PrintToConsole "Context: %i %n" ref ref

 

I like the name, of course, since that tells me important things. But the number will tell me different important things.

 

For example: the first two digits of the number tell me the mod the reference came from. But also, I can see if it's a bad reference.

 

If you are sometimes getting bad references from GetContainer you might need extra tests for those cases?

Link to comment

When I am debugging references' date=' I always like displaying both the numeric form of the reference and the name.

 

For example:

 

PrintToConsole "Context: %i %n" ref ref

 

I like the name, of course, since that tells me important things. But the number will tell me different important things.

 

For example: the first two digits of the number tell me the mod the reference came from. But also, I can see if it's a bad reference.

 

If you are sometimes getting bad references from GetContainer you might need extra tests for those cases?[/quote']

Cool, didn't know about the %i option for messages, that might help a lot :)

 

Link to comment
  • 5 months later...

Archived

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

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use