Satellite shots ingame, spectator view? [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Satellite shots ingame, spectator view? [Solved]

Post by ForceMaster »

Hi, friends!
Is possible add satellite shots like the background in the team selection screen but ingame when you are controling an unit?

I mean: you spawn, then get an objective, when you complete the objective, shown an satelite shot like spectator view, run a timer that change the camera view to the default unit view.

May be done via LUA or any other method? thanks!
Last edited by ForceMaster on Tue Feb 17, 2015 11:30 pm, edited 1 time in total.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: Satellite shots ingame, spectator view?

Post by razac920 »

I imagine the best way to go about doing that is to force the player into some sort of turret that has the view you want, and then to kick him out and put him back where he was once the timer ends. Of course, the player could exit the turret earlier, so you might want to continually force the player into the turret until the timer ends.
hunpeter12
Command Sergeant Major
Command Sergeant Major
Posts: 260
Joined: Mon Apr 18, 2011 2:53 pm
Projects :: Underground City The Complex [WIP]
Games I'm Playing :: SWBF2

Re: Satellite shots ingame, spectator view?

Post by hunpeter12 »

You might want to ask Maveritchell about this. He used a 'cinematic' type of camera in his Bakura: Rogue Assault map.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Satellite shots ingame, spectator view?

Post by Maveritchell »

razac920 wrote:I imagine the best way to go about doing that is to force the player into some sort of turret that has the view you want, and then to kick him out and put him back where he was once the timer ends. Of course, the player could exit the turret earlier, so you might want to continually force the player into the turret until the timer ends.
hunpeter12 wrote:You might want to ask Maveritchell about this. He used a 'cinematic' type of camera in his Bakura: Rogue Assault map.
The first quote is pretty much what I did, although I disabled the player entirely when he was in the turret.
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Re: Satellite shots ingame, spectator view?

Post by ForceMaster »

Thanks for answer guys.

I imagined a similar method to solve it but still not know how to make the player into the turret (and can not get out) and then have it appear in the same place. Can you post your lua from that map you worked?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Satellite shots ingame, spectator view?

Post by Maveritchell »

Use "EnterVehicle" to force someone into a turret (they count as vehicles in this sense). Use the property "PhysicsActive" to disable/enable players.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Satellite shots ingame, spectator view?

Post by [RDH]Zerted »

There's also a MoveCameraToEntity function.

Thread about messing with the player's view: viewtopic.php?f=27&t=17171&start=20&hilit=CreateMatrix
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Re: Satellite shots ingame, spectator view?

Post by ForceMaster »

Maveritchell wrote:Use "EnterVehicle" to force someone into a turret (they count as vehicles in this sense)
I'm trying with "EnterVehicle" but not work, I ve place a turret (armedbuilding) in the layer and the code in the LUA like this:

Code: Select all

    Objective1.OnStart = function(self)
        att_obj1_aigoal = AddAIGoal(ATT, "Deathmatch", 100)
        def_obj1_aigoal = AddAIGoal(DEF, "Deathmatch", 100)

EnterVehicle(player, "my_turret_name")

    end
error log:

Code: Select all

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(3204)
EntityVehicle(): entity is not an EntityFlyer|Hover|Walker!
These code works with turrets? or only with Flyer|Hover|Walker?
[RDH]Zerted wrote:There's also a MoveCameraToEntity function
Thanks Zerted, I can use it without cother codes? I mean, only put some like this in my lua?:

Code: Select all

MoveCameraToEntity("my_turret_name")
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Satellite shots ingame, spectator view?

Post by Maveritchell »

Hey, I'm an idiot; sorry. ExitVehicle works with turrets, EnterVehicle doesn't. Instead of turrets, just make a dummy flyer. They sit anywhere you place them because their physics aren't active until someone takes off, and this is what I actually used in Rebel Ops 2 and 3 (I actually checked my references this time - promise!).
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Re: Satellite shots ingame, spectator view?

Post by ForceMaster »

Do not worry, it's just a little forgotten. Ok, just to be safe, I just need to put a flyer in the map (like a prop or building, Placed in ZE) and then place the code in the lua with the name of the flyer that I' ve placed in ZE or should I make it through the vehicle spawner?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Satellite shots ingame, spectator view?

Post by Maveritchell »

You're placing the flyer directly into the world, just like a prop or building.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Satellite shots ingame, spectator view?

Post by [RDH]Zerted »

ForceMaster wrote:I can use it without cother codes?...

Code: Select all

MoveCameraToEntity("my_turret_name")
I don't know, I've never used it. But that looks ok. SWBF2 uses it when you click on a planet in a campaign:

Code: Select all

MoveCameraToEntity(ifs_campaign_main.planetSelected .. "_camera")
MoveCameraToEntity(ifs_freeform_main.planetSelected .. "_camera")
MoveCameraToEntity(planet)
MoveCameraToEntity(selected .. "_camera")
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Re: Satellite shots ingame, spectator view?

Post by ForceMaster »

Thanks to all! The Mav's method works very good, I've placed an "camera" vehicle (flyer) with the item_pointer.msh mesh and the proper command in the .lua with OnEnterRegion function.

Code: Select all

	ActivateRegion("region_camera")
	camunofunction = OnEnterRegion(
	function(region, player)
	if IsCharacterInRegion(player, "region_camera") then
        EnterVehicle(player, "camera1")
		SetProperty("camera1", "PhysicsActive", 0) 
	end
	   end,
	"region_camera"
	)
Thanks Mav! thanks Zerted! :D
Post Reply