Jump to content

[Request] Toggleable campfires


Guest deleted2027229

Recommended Posts

Is this still a mod request?

 

Scanning through I saw a number of 'PlaceAtMe' solutions which leads to save bloat. My solution to that is...

 

  1. Put a copy of ctrlogfiles.nif in a mod folder.
  2. Change it's collision to anim static using NifSkope (so it can be safely moved around).
  3. Add that under Static in a new esp.
  4. Create a Utils interior and add the object to it.
  5. Write a function that drops it in front of player.

The function on step 5 can be called from a spell or hotkey.

 

While it works first time the subsequent issues seem to be related to cell caching - if cached it fails else it works. Subsequent moves add another problem. It is if PositionCell/PositionWorld displace the Nif Origin each use - the change in angle and increase in position state that it is accumulating. kvRectifyDegree is simply a variation of FMod based on <360


	let fAngleZ := call kvRectifyDegree Player.GetAngle z
	let fRadZ := fAngleZ * 0.0174533
	
	let fX := Player.GetPos x
	let fY := Player.GetPos y

	let fX += 256 * cos fAngleZ
	let fY += 256 * sin fAngleZ
	let fZ := 32
	
	if Player.IsInInterior
		let fZ += Player.GetPos z
		let refLocation := Player.GetParentCell
		kvToggleFireLogs01Ref.PositionCell fX, fY, fZ, fRadZ, refLocation
	else
		let fZ += GetTerrainHeight fX, fY
		let refLocation := Player.GetParentWorldspace
		kvToggleFireLogs01Ref.PositionWorld fX, fY, fZ, fRadZ, refLocation
	endif

Having written one of the first data charting components for NT web servers I doubt I have my trig wrong here. I know the engine requires conversion over Worldspace quadrants but that does not explain relocation failure for an instantiated object.

 

Why is it failing to move on whatever number of calls?

Link to comment
Share on other sites

  • 2 months later...

It propably doesn't matter anymore, but latest Nexus addition (on 3.6.2023) is "Light The Campfires" mod made by Lastutin. Maybe worth a try?

 

@glowplug: I think using Player.GetParentCell will work in exteriors too, is there some reason using different set of commands for them?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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