Hey community,
I know that one can block or lock the production of certain units via SCAR in a custom map's _ID.scar file or in a game-mode script.
Now my question is: Is it possible to allow/enable the construction of certain units this way, too? For example adding a Tiger to the WH T4 building - via game-mode script?
As alternative, in case combined with a tuning pack, would it be possible to add a certain upgrade to all players+AI (that is an requirement for the production of the unit) on beginning of the round via SCAR?
Enable squad production via SCAR?
4 Aug 2016, 12:20 PM
#1

Posts: 84
4 Aug 2016, 23:47 PM
#2


Posts: 756 | Subs: 8
It is not possible to add units to a building via SCAR, but you can add upgrades using the Player_CompleteUpgrade function.
http://fortresseuropemod.com/scardoc/frameset.htm
http://fortresseuropemod.com/scardoc/frameset.htm
5 Aug 2016, 13:19 PM
#3

Posts: 84
Thanks a lot, man. As pointed out, the upgrade option should do the trick as well. However, one more question: How can I reference a custom upgrade from a tuning pack in the function. I have no problems getting a vanilla upgrade running like this, but once I type in the name of my upgrade (lets call it "my_upgrade"), I get a fatal.
So this is the code I added to the OnInit() of the .scar of a custom wincondition:
I guess I have to insert the ModID along with the upgrade name. I'm not exactly sure how though.
So this is the code I added to the OnInit() of the .scar of a custom wincondition:
Code
for i = 1, World_GetPlayerCount()
do
local player = World_GetPlayerAt(i)
Player_CompleteUpgrade(player, BP_GetUpgradeBlueprint("my_upgrade"))
end
I guess I have to insert the ModID along with the upgrade name. I'm not exactly sure how though.
5 Aug 2016, 13:42 PM
#4


Posts: 756 | Subs: 8
All custom blueprints use the format "ModId:BlueprintName". For example:
Code
Player_CompleteUpgrade(player, BP_GetUpgradeBlueprint("2e942f74cb054cf398885a590ab1af7e:my_upgrade"))
5 Aug 2016, 13:51 PM
#5

Posts: 84
Cheers mate ;D
PAGES (1)

1 user is browsing this thread:
1 guest
Livestreams
![]() |
![]() |
![]() |
6 | ||
![]() |
![]() |
![]() |
167 | ||
![]() |
![]() |
![]() |
163 | ||
![]() |
![]() |
![]() |
2 | ||
![]() |
![]() |
![]() |
2 | ||
![]() |
![]() |
![]() |
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.60383.879+7
- 2.10935.757+4
- 3.43264.871+1
- 4.302169.641+1
- 5.14851.744-1
- 6.14765.693+15
- 7.14939.793+8
- 8.401200.667+10
- 9.19565.750+8
- 10.199105.655+2
Replay highlight
VS
-
cblanco ★
-
보드카 중대
-
VonManteuffel
-
Heartless Jäger

Einhoven Country

Honor it
14

Download
1387
Board Info
338 users are online:
1 member and 337 guests
188betsalon
188betsalon
1 post in the last 24h
8 posts in the last week
36 posts in the last month
8 posts in the last week
36 posts in the last month
Registered members: 54508
Welcome our newest member, qh88applecom
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, qh88applecom
Most online: 2043 users on 29 Oct 2023, 01:04 AM