Login

russian armor

Help Coding Player Races and Names

11 Mar 2015, 17:59 PM
#1
avatar of Opulent Omega

Posts: 17

Hi folks!

I'm new to the World Builder scene and have recently created my first map. But here's a snag... I researched online and found that in order to code a fixed race for a set player on the map, I needed to create a .scar file to match my map file.

Ok...so my map is called Township.sgb ... and as such I made a file called Township.scar with the following code to try and get fixed races and player names for certain players:

Code
import("ScarUtil.scar")

function OnGameSetup()

player1 = World_GetPlayerAt(1)
player2 = World_GetPlayerAt(2)

Setup_SetPlayerRace(player1, "soviet")
Setup_Player(player2, "German Waffen SS", "german", 2)

end


Not only is my code not working at all... I also get this strange 'pause' at the start of the game right after my map finishes loading. I need to press the esc key to bring up the main menu and exit the main menu again to get the game to actually start, and after the game starts... none of the things I want to happen occurred (such as the custom "German Waffen SS" name).

I would greatly appreciate any help in the matter. This is doing my head in! :(

P.S: I did not create any SCAR markers in my map...does that have anything to do with it? :/
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

663 users are online: 1 member and 662 guests
M3g4s34n
9 posts in the last 24h
22 posts in the last week
137 posts in the last month
Registered members: 45031
Welcome our newest member, Pet ID Tags
Most online: 2043 users on 29 Oct 2023, 01:04 AM