Login

russian armor

Scar coding problems

22 Dec 2014, 12:45 PM
#1
avatar of Flying Dutchy

Posts: 43

Greetings everybody.

I spent a great deal of time making a map, and got the blizzard to work by overwriting everything in the SCAR file with the following before exporting the package:

-------------------------------------------------------------------------
-------------------------------------------------------------------------

import("ScarUtil.scar")
import("Systems/BlizzardMulitplayer.scar")

-------------------------------------------------------------------------
-- [[ ONINIT ]]
-------------------------------------------------------------------------

function OnInit()


MP_BlizzardInit("data:art/scenarios/presets/atmosphere/DLC/mp_don_river_01_blizzard.aps" ,"data:art/scenarios/presets/atmosphere/DLC/mp_don_river_01.aps", nil, nil, true, nil)

end


Scar_AddInit(OnInit)


Now I know absolutely nothing about SCAR coding, and everything I found thus far is extremely confusing, not coherent, in bad english, or incomplete. I went and tried to have lights turned on, so I did what one of the posts told me to do, and created entity groups for the lights. Now I have 5 entity groups. I tried adding the following to the SCAR file:

function OnInit()
EGroup_SetAnimatorState(eg_lamps, "Light_State", "On")
end

Scar_AddInit(OnInit)

But I have no idea where to keep repeating this, modify that single line of code to have all 5 entity groups, wheter I have to have "end" 6x in my document, or function OnInit... I'm absolutely clueless and discouraged. Can somebody please clarify what my SCAR file should look like and why?

thanks in advance guys
26 Dec 2014, 00:53 AM
#2
avatar of Srinidhalaya

Posts: 357

You should have all the lights you want turned on, inside the Entity Group named "eg_lamps".

If you are adding this ontop of your blizzard script, try this.

Code
-------------------------------------------------------------------------
-------------------------------------------------------------------------

import("ScarUtil.scar")
import("Systems/BlizzardMulitplayer.scar")

-------------------------------------------------------------------------
-- [[ ONINIT ]]
-------------------------------------------------------------------------

function OnInit()

EGroup_SetAnimatorState(eg_lamps, "Light_State", "On")
EGroup_SetAnimatorState(eg_lamps, "Light", "On")

MP_BlizzardInit("data:art/scenarios/presets/atmosphere/DLC/mp_don_river_01_blizzard.aps" ,"data:art/scenarios/presets/atmosphere/DLC/mp_don_river_01.aps", nil, nil, true, nil)

end

Scar_AddInit(OnInit)



If you still have problems, let me know.
1 Jan 2015, 14:21 PM
#3
avatar of Flying Dutchy

Posts: 43

Worked like a charm, I also seem to have figured some stuff out here and there about the SCAR file. I didn't know you could just add any piece of script on top of the other. But it works now! Thanks!
1 Jan 2015, 19:42 PM
#4
avatar of Srinidhalaya

Posts: 357

Just remember, the exact placement of different scripts may make or break the script. The majority of script problems is incorrect placement, or missing command characters.
1 user is browsing this thread: 1 guest

Livestreams

unknown 10
United States 166
New Zealand 12
unknown 4

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

982 users are online: 982 guests
0 post in the last 24h
5 posts in the last week
33 posts in the last month
Registered members: 49127
Welcome our newest member, Constant
Most online: 2043 users on 29 Oct 2023, 01:04 AM