Login

russian armor

World Builder Quirks - Lighting and Invincible Structures

26 Jan 2014, 16:30 PM
#1
avatar of MrEasyUK

Posts: 34

As we all know the AI in the game just don't rebuild bridges which kills game play on many maps, on the upside I can make land bridges but in some cases it really spoils the design.

I have used Scar code in the past to get the Rail and Arnhem bridges to be invincible with pathing etc for AI with no problem. The code for example in CoH1 used to create an issue for Victory Point games, however the work around was as per the below.

Create an entity group EG_Invincible and add the items to the group then pop the below in to the scare file..

Code
import("ScarUtil.scar")
import("WCUtil.scar")

function OnGameSetup()
g_CheckAnnihilate = true
end

function OnInit()
Invulnerable()
end

Scar_AddInit(OnInit)


function Invulnerable()
EGroup_SetInvulnerable(eg_invincible, true)
end


Adding the above always worked, the question is what is the new code for making an item invincible in coh2 and does world builder carry over the scar file etc as it all used to be done with Corsix?

In addition to making items invincible I always managed to create lighting effects on my maps.. so lamp posts could come on in a transition or stay on etc, I am pretty savvy with world builder and noted that once you have saved a weather preset you cant load it again. I know there was a work around in COH1 but I am at a loss as to how to do it... I have read many topics now with no definitive answer on how to get lights to turn on

I am also unable to extract anything from CoH2 archives with any of the tools listed on forums...am I missing something here as I would love to break down a map with invincible bridges and light effects to see how it has been done.

I can appreciate that Relic etc.... don't want too much modding going on as they are selling Skins and Commanders in their store etc.... but the above is more about map making for the community which is some thing I have done since World Builder first came out for CoH.

Any help would be greatly appreciated.

Regards,

MrEasyUK
26 Jan 2014, 18:27 PM
#2
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

You could add EGroup_SetInvulnerable(eg_invincible, true) inside of the function OnInitID in <mapname>_ID.scar

Note that WorldBuilder re-generates this file every time you save the map.
26 Jan 2014, 19:04 PM
#3
avatar of MrEasyUK

Posts: 34

Tried that this is what it looks like

Code

function OnInitID()

-- [[ Markers ]]

-- [[ Squad Groups ]]

-- [[ Entity Groups ]]
eg_invuln = EGroup_CreateIfNotFound("eg_invuln")

end
26 Jan 2014, 19:06 PM
#4
avatar of MrEasyUK

Posts: 34

Also popped this inside the Scar file

Code

Set Egroups invulnerable
EGroup_SetInvulnerable(eg_invuln, true)
26 Jan 2014, 21:24 PM
#5
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

Code

function OnInitID()

-- [[ Markers ]]

-- [[ Squad Groups ]]

-- [[ Entity Groups ]]
eg_invuln = EGroup_CreateIfNotFound("eg_invuln")
EGroup_SetInvulnerable(eg_invuln, true)
end
27 Jan 2014, 12:59 PM
#6
avatar of MrEasyUK

Posts: 34

Thank you very much, I see the error also your right when you save it down you need to make sure that the code is still in the scar file as WB overwrites it when it is saved. So I saved the map, checked the scar file and then packed it.. Many thanks there

With that answered my other question is on Lighting effects... Back in COH you would save your presets how you want them with the 'time of day' to night, then put the time of day back on 'day'. Then go down to the bottom to transitions, and click add, and add the new preset. Put the transition at 0 and it was done.

I don't think you can do this in CoH2 as you cant load a created preset... does anyone have any idea how to get the lights to come in CoH2 please?
28 Jan 2014, 12:55 PM
#7
avatar of kildor
Benefactor 226

Posts: 53

My lights come on at night, but only certain preset night atmospheres work for me I've noticed, so I just use them as part of my transitions.
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

649 users are online: 3 members and 646 guests
trigg, serg_codmod, Katitof
2 posts in the last 24h
37 posts in the last week
137 posts in the last month
Registered members: 45064
Welcome our newest member, edmond2003s
Most online: 2043 users on 29 Oct 2023, 01:04 AM