After scouring the internet, I have found that looking for documentation on using SCAR script has been quite disappointing. Among my issues is the fact that, for example, I wasn't able to find any clear guide or list on how to implement the Player_AddAbility function. I wasn't sure whether to just take the name from the game or whether it required any special syntax.
So if anyone can please offer some guidance as to a clear and definitive way to do what I need to do, it would be much appreciated.
This is the script I have so far:
function OnInitID()
for i = 1, World_GetPlayerCount() do
local player = World_GetPlayerAt(i)
Player_CompleteUpgrade(player, BP_GetUpgradeBlueprint("Recon_Sweep"))
Player_AddAbility(player, BP_GetAbilityBlueprint("Recon_Sweep"))
Modify_AbilityMunitionsCost(player, BP_GetAbilityBlueprint("Recon_Sweep"), -60)
end
-- [[ Markers ]]
-- [[ Squad Groups ]]
-- [[ Entity Groups ]]
end
I created this using a forum's content that I was able to find. However it doesn't quite do what I want.
1) When specifying a player, I realize I could use World_GetPlayerAt function to find the player at a certain spawn. However I am unsure whether that player spot needs to be filled or whether, for example, I can specify to give the ability to players 1, 2 and 3, whether or not those players are in the game or not.
2) I was able to implement Recon Sweep by just using the name, however when I tried to input "P47_Strafing_Run" instead, it came up as a critical SCAR error in the game. How am I supposed to type the name of the ability I wish to give?
3) I saw on the SCAR Documentation page that you can edit the munition costs, recharge and duration etc... of an ability, and while the above munition cost reduction works, I also would like to change the Command Point cost so it's available immediately. Is there a way to do this? And if so, is there a way to do it so that the only ability affected is the one I give the player and not, for example, someone who takes the Tactical Support Company (who comes with Recon Sweep)?
4) The next step, after figuring out the above is to allow the players who've received the ability the restriction to only use it once. A one time use kind of thing, given at the beginning of the match. Is this difficult or possible?
Thank you so much to whoever can help me, I'm working on a D-Day inspired beach assault map. I've placed mines on the beach head but want to give a one time use strafing run ability to even up the teams.
Cheers!