Scar Code table and Events
Posts: 19
For instance
Event_TeamOwnsTerritory( Function callback, Table data, TeamID team, Int/Table/EGroup/Entity sectorID/group/entity[, ANY/ALL all, Float delay] )
Where can we find "Table data" from this section?. Can anybody give us documentation on this, examples or any lead in the right direction.
Much appreciated!
Posts: 3421 | Subs: 11
and copy all .scar files from these folders to a new folder. You can use search *.scar in the windows explorer for this. Then get notepad++ and use search in files over the directory you copied all scar files.
Posts: 19
Posts: 19
i have most things going well, i have run into a few problems though, one of which i need some advice on:
when i try to call some events, the game tries to check wether the game is rtm or not (i think thats just a validation check if the game is modded or manufacturor default release). and then it says it tries to call global and comes back as nill. I seem to be unable to fix that. (even with adding -rtm in console before)
looking into the problem i don`t really understand why it does that either, because i use events like event_playerdoesntownterritory(callback, data, player, ter) and thats where it searches in event.scar line 168 Game_IsRTM, which is a part of events_add. (i can`t trace back why it goes to events_add in the first place).
any help by anybody?
Posts: 19
I am building scripts for the community to use, that transform multiplayer maps easily in more interesting multiplayer objectives / mission maps!
Convoy: both teams have supply trucks drive into the map from different sides and go over a route to the base. If the trucks make it, they deliver fuel, ammo and/or manpower. Destroying an enemy supply truck makes them lose victory points too.
Demolition: both teams have 2,3 or 4 static objectives to defend, being bridges, buildings, trucks, etc. As long as they are alive they provide a bonus to ammo, fuel, manpower, ability cooldowns, artillery calldowns, unit cost, etc. Destroying an enemy objective stops the bonus and the enemy loses victory points for it.
Officers: both teams have one officer per player to defend. The officer is unselectable. As long as an officer is alive, extra troops come to the battlefield every minute that attack move to the enemy base.
Stagewars: a mission that starts with convoy, upgrades to demolitions after 6 waves and upgrades to normal victory point control with 1 or victory points max after a set amount of objectives have exploded. Each stage increases interaction area (map size) in all directions, leaving bases in the middle of the map, trucks to defend, objectives to defend and attack and points to control.
I have completed the functionallity on Convoy and Demolitions and stagewars, working on officers right now. only the UI is still crap (have to figure out how to do pretty objective overlays with displaying pretty timers and all. have seen the functions, still have to give them a look).
Posts: 19
Posts: 3421 | Subs: 11
Lists of all kinds of blueprints can be found in AttribArchive/attrib/scar/luaconstsauto.scar
Posts: 19
Posts: 19
Posts: 19
Posts: 3421 | Subs: 11
So far the most complex system I've coded for COH2 is Capture th Flag game mode, http://steamcommunity.com/sharedfiles/filedetails/?id=262090680
It has a few rules which are executed each frame.
Posts: 19
I have run into another problem:
local mes_MissionConvoy = LOC("Mission: Convoy")
UI_SystemMessageShow(mes_MissionConvoy)
or just
UI_SystemMessageShow(LOC("Mission: Convoy"))
This works, BUT it displays
LOC: Mission: Convoy
and not just
Mission: Convoy
Can`t get it fixed, tried everything. what am i missing here?
Posts: 3421 | Subs: 11
function Util_CreateLocString(text)
local tmpstr = LOC(text)
tmpstr[1] = text
return tmpstr
end
Posts: 19
Posts: 19
I have the 'mission: CONVOY' gamemode now basically finished for pvp!
I have run into a problem though. when i have squads enter the map using the createsquad function, but the player owner is an AI, the squads don`t listen to any of the prescripted commands (cmd_move()) etc. How do i fix this problem? is there an easy solution, or do i have to start messing with AI now?
Posts: 19
I need: A mapper that wants to help me get this script promoted! If anybody has an unreleased map that would go with dynamic combat and is suitable for convoys, let me know! (or i have to map one myself, which will take forever right now for me)
Posts: 70
Posts: 19
Posts: 19
Posts: 19
Livestreams
2 | |||||
2 | |||||
2 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.35057.860+15
- 3.1110614.644+11
- 4.921405.695+5
- 5.634229.735+8
- 6.276108.719+27
- 7.306114.729+2
- 8.262137.657+3
- 9.1045675.608+3
- 10.722440.621+4
Replay highlight
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Board Info
7 posts in the last week
35 posts in the last month
Welcome our newest member, Dreufritt
Most online: 2043 users on 29 Oct 2023, 01:04 AM