Author Topic: [done] give setCameraPosition a faction attribute  (Read 901 times)

treba

  • Guest
[done] give setCameraPosition a faction attribute
« on: 10 October 2012, 16:32:27 »
i know i'm quite demanding atm, but i'm quite exited that we'll have network scenarios soon in our stable  :)

this time i'd like to ask if the setCameraPosition can get a faction attribute so it does not move everyones (or one?) camera to the same spot.
i guess we need a new function like setCameraPositionForFaction

i really like to use the camera to give the player some orientation so he knows somehow what to do etc. of course, faction specific messages would be nice, too, but i give the camera priority
« Last Edit: 10 October 2012, 18:30:09 by softcoder »

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: give setCameraPosition a faction attribute
« Reply #1 on: 10 October 2012, 18:14:34 »
These lua functions already exist for network scenarios:

networkShowMessageForFaction(string text, string header,int factionIndex)
networkShowMessageForTeam(string text, string header,int teamIndex)

Thanks

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: give setCameraPosition a faction attribute
« Reply #2 on: 10 October 2012, 18:21:24 »
Hmm, those Lua functions do not seem to be related to what Treba is asking for, am I misunderstanding something?

Maybe Softcoder just mentioned these existing network scenario functions because they are also faction / team specific and can serve as a template to create the new functionality Treba requests.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: give setCameraPosition a faction attribute
« Reply #3 on: 10 October 2012, 18:29:30 »
Svn now has two new lua functiosn to set camera for a faction and another for all members of a team:

networkSetCameraPositionForFaction(int factionIndex,Vec2i pos)
networkSetCameraPositionForTeam(int teamIndex, Vec2i pos)

treba

  • Guest
Re: [done] give setCameraPosition a faction attribute
« Reply #4 on: 10 October 2012, 19:07:21 »
thanks. also for the hint to the network messages.
we definitely have to update the wiki on all the new lua stuff when the release is done.