Saints Row IV Check if player is in ship crib

So,there is a thread I created but I want it to to be activated only when you are in the simulation,not in the real world ship.Is there a Lua function that returns a boolean whether you are in the ship or in the simulation?

EDIT:Well if that sort of function doesn't exist,then I'm thinking about using a returning function which is somehow related to the player currently being in the ship crib.That's gonna do the trick too I suppose.
 
Last edited:
I wonder if there is a way to ask your location and use the interior name. Tulip Sniper is your man here though.
 
There is a function get_current_hood_by_position(character name) which checks in which hood the character currently is.What I need now is just the name of the hood the ship is located in.

EDIT:I have a better idea,I could make a function which checks that if the player is not in any of the Steelport hoods,then clearly he is in the ship,so a list of the hood names is the last thing I need if possible.

EDIT 2:I made a looping function to return a text message in game to tell me which hood am I in,using get_current_hood_by_position(LOCAL_PLAYER) and to my surprise,every hood in the game has the same name : "No Hood".Even in the ship it's still showing me "No Hood".

It seems like I'm running out of solutions here,is there any other way ?

LAST EDIT : Problem solved ! I finally found a solution by simply using get_object_pos() function.I simply found the coordinates of the width,lenght and height of the Zin Ship and made a function that monitors whether if the player is inside the ship or not.That did the trick,phew!I need a break now.
 
Last edited:
You might look at the script for mission mm_4_1. If I recall, we added a function to check exactly what you were looking for (specifically for coop).

It's also worth noting that even while in the city, you're not always in a hood. All of the water regions (which means most of the bridges as well) aren't included in hood areas.
 
Yup,it's crib_ship_players_on_ship() .Only if I had known about that 12 hours ago,I wouldn't have gone all through all this coordinate-hoodish mess.

Still,I'm pleased that I made it without that function :cool:.
 
Back
Top