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

SHOUT IT OUT!

No ProfanityNumber of ShoutsRefresh Shout Box
Rosbone: you know, you give the mods something to do so they can feel useful and you dont even get a thank you :guyokay:
Yesterday, 23:06 PM
Willy Pete: :banned:
Yesterday, 20:37 PM
Reverb: o_O
Yesterday, 12:38 PM
aerafield: @LimaOscarMike I would say nowadays is a decent time to try CoH3. If you loved CoH2 however, there is a solid chance you're gonna dislike CoH3
Last Monday, 17:04 PM
LimaOscarMike: My laptop can't even run COH3. Should I get them on my Series X or is it dead yet?
Last Saturday, 05:10 AM
Rosbone: One of my last major gripes about Coh3. Price is still too high I feel for growth. But progress is always good.
Last Saturday, 04:43 AM
Rosbone: I am not 100% sure but I think Relic actually fixed up the skirmish menus a little last patch. If so, thank you and keep it coming.
Last Saturday, 04:39 AM
Osinyagov: Suddenly, coh2 is slowly dying, but you can play it, playerbase still big enough
09 Apr 2025, 17:00 PM
Osinyagov: Wow, i remember you from zansi and vali videos, good old memories
09 Apr 2025, 16:58 PM
Beinhard: o7 miss this game and zansi
09 Apr 2025, 14:09 PM
Lady Xenarra: @Willy Pete The lack of April Fools this year is odd lol
02 Apr 2025, 01:34 AM
Willy Pete: @Rosbone not dead yet. when that happens the font will switch to Papyrus :*(
02 Apr 2025, 00:16 AM
dasheepeh: it was an honor guys :guyokay:
01 Apr 2025, 20:34 PM
aerafield: yeah I already prepared my "Can't believe there's comic mode for the 10 daily visitors even on this April 1st" :guyokay:
01 Apr 2025, 20:29 PM
Rosbone: @dasheepeh I guess that means this site is officially dead :guyokay:
01 Apr 2025, 20:19 PM
dasheepeh: no comic sans font for april 1st this year?
01 Apr 2025, 19:56 PM
Willy Pete: @Lady Xenarra this you? https://i.imgflip.com/3e4thi.jpg
01 Apr 2025, 02:53 AM
Lady Xenarra: Does anyone else think that USF needs buffs? It feels like they’re on life support sometimes
01 Apr 2025, 02:36 AM

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

233 users are online: 1 member and 232 guests
shinasukac
3 posts in the last 24h
10 posts in the last week
37 posts in the last month
Registered members: 53992
Welcome our newest member, Beiriger
Most online: 2043 users on 29 Oct 2023, 01:04 AM