Jump to content

Obtaining whether a Location is a WorldSpace


Recommended Posts

Hi, I'm trying to get make a function that determines whether a given location is a world space or the location of the player is a world space.

I don't want to generically just make it the Commonwealth because there are various Worldspaces that I would like to encompass in a general "isWorldSpace"

Here is what I have so far:

Bool Function isInWorldSpace(Location akLocation, Bool PlayerLoc)
	If PlayerLoc == true
		Loc = game.GetPlayer().GetCurrentLocation()
		isWorldSpace = Loc.isLinkedLocation(Commonwealth , LocTypeWorld)
	Else
		isWorldSpace = akLocation.isLinkedLocation(Commonwealth , LocTypeWorld)
	EndIf
	return isWorldSpace
EndFunction

I don't think this is actually getting an accurate boolean value, true being that it is a world space, false, not. I thought checking the keyword LocTypeWorld and asking if the akLocation/Loc is linked to the Commonwealth might be a temporary fix till I figure out how to check against all the worldspaces. Any solutions are welcomed, thanks :smile:

Edited by D1v1ne122
Link to comment
Share on other sites

  • Recently Browsing   0 members

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