Scar help -1 reply

Please wait...

Tau're

>.

50 XP

6th April 2008

0 Uploads

184 Posts

0 Threads

#1 10 years ago

:)Hey ive been working on a new survival map, on which that you choose a race and your base is set up depending on your race as well as the enemies you face, but ive been caught at the first snag, making it realise which race i chose --[[defining the name of the player's faction]] if MetaMap_GetPlayerRaceName() == "chaos_marine_race" then factionname = "$690014" colorscheme = "default_1" g_Player1 = Setup_Player(0, factionname, MetaMap_GetPlayerRaceName(), 1) Misc_PlayerTeamColor(g_Player1, colorscheme) elseif MetaMap_GetPlayerRaceName() == "guard_race" then factionname = "$690011" colorscheme = "default_8" g_Player1 = Setup_Player(0, factionname, MetaMap_GetPlayerRaceName(), 1) elseif MetaMap_GetPlayerRaceName() == "ork_race" then factionname = "$690013" colorscheme = "default_4" g_Player1 = Setup_Player(0, factionname, MetaMap_GetPlayerRaceName(), 1) Misc_PlayerTeamColor(g_Player1, colorscheme) elseif MetaMap_GetPlayerRaceName() == "space_marine_race" then factionname = "$690010" colorscheme = "default_0" g_Player1 = Setup_Player(0, factionname, MetaMap_GetPlayerRaceName(), 1) elseif MetaMap_GetPlayerRaceName() == "tau_race" then factionname = "$690015" colorscheme = "default_0" g_Player1 = Setup_Player(0, factionname, MetaMap_GetPlayerRaceName(), 1) elseif MetaMap_GetPlayerRaceName() == "necron_race" then factionname = "$690016" colorscheme = "default_0" g_Player1 = Setup_Player(0, factionname, MetaMap_GetPlayerRaceName(), 1) i copied this from 1 of the campaign files but it wud come up as map is not a metamap wen i run the map, (i made it over a skirmish map like my past map (chaos assault)) if anyone can help me out it wud be appreaciated




dark40k

SCAR is fun!

50 XP

14th January 2009

0 Uploads

13 Posts

0 Threads

#2 10 years ago

I guess it is Player_GetRaceName() that you are looking for. Check SCARDoc for more informations. Player_GetRaceName() is for campaign and is useless for skirmish.

Hope this helps.




Tau're

>.

50 XP

6th April 2008

0 Uploads

184 Posts

0 Threads

#3 10 years ago

ive tried that but it always comes up as its a nil value




dark40k

SCAR is fun!

50 XP

14th January 2009

0 Uploads

13 Posts

0 Threads

#4 10 years ago

I went too fast. As you are trying to set the race then I suppose you are running this script using OnGameSetup(). At this level I don't know how the player race information can be extracted. Sorry.