Page 1 of 1
Satellite shots ingame, spectator view? [Solved]
Posted: Mon Feb 09, 2015 3:41 pm
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!
Re: Satellite shots ingame, spectator view?
Posted: Mon Feb 09, 2015 4:34 pm
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.
Re: Satellite shots ingame, spectator view?
Posted: Mon Feb 09, 2015 6:16 pm
by hunpeter12
You might want to ask Maveritchell about this. He used a 'cinematic' type of camera in his Bakura: Rogue Assault map.
Re: Satellite shots ingame, spectator view?
Posted: Mon Feb 09, 2015 10:06 pm
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.
Re: Satellite shots ingame, spectator view?
Posted: Mon Feb 09, 2015 10:36 pm
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?
Re: Satellite shots ingame, spectator view?
Posted: Mon Feb 09, 2015 10:37 pm
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.
Re: Satellite shots ingame, spectator view?
Posted: Thu Feb 12, 2015 4:56 am
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
Re: Satellite shots ingame, spectator view?
Posted: Thu Feb 12, 2015 8:37 pm
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")
Re: Satellite shots ingame, spectator view?
Posted: Thu Feb 12, 2015 8:46 pm
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!).
Re: Satellite shots ingame, spectator view?
Posted: Thu Feb 12, 2015 9:18 pm
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?
Re: Satellite shots ingame, spectator view?
Posted: Thu Feb 12, 2015 9:20 pm
by Maveritchell
You're placing the flyer directly into the world, just like a prop or building.
Re: Satellite shots ingame, spectator view?
Posted: Thu Feb 12, 2015 10:25 pm
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")
Re: Satellite shots ingame, spectator view?
Posted: Tue Feb 17, 2015 11:29 pm
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!
