Depechivo
Member-
Content Count
5 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout Depechivo
-
Rank
Rookie
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Getting started with scripts
Depechivo replied to Alejandro Cano's topic in Arma Reforger - Configs & Scripting
https://community.bistudio.com/wikidata/external-data/arma-reforger/ArmaReforgerScriptAPIPublic/classes.html https://community.bistudio.com/wiki/Category:Arma_Reforger/Modding/Tutorials/Scripting -
WorldEditor makes wrong override function for OnPlayerKilled
Depechivo replied to Depechivo's topic in Arma Reforger - Configs & Scripting
Fix this problem with that function: protected override bool HandlePlayerKilled(int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer) { Print("--- HandlePlayerKilled---"); return super.HandlePlayerKilled(playerId, playerEntity, killerEntity, killer); } P.S. "OnPlayerKilled" was mod function, but World Editor ignores "notnull" in override functions when u try to create it from "Script+" menu in details tab. -
Spawn layer script
Depechivo replied to Koning Julien's topic in Arma Reforger - Configs & Scripting
Try to use flags. targetEntity.SetFlags(EntityFlags.ACTIVE, false); -
WorldEditor makes wrong override function for OnPlayerKilled
Depechivo replied to Depechivo's topic in Arma Reforger - Configs & Scripting
I tried like this, but it doesnt work too: class GameMode_Editor_Full1_Class: SCR_GameModeEditor { // user script // code here override void OnPlayerKilled(int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer) { Print("--- OnPlayerKilled ---"); super.OnPlayerKilled(playerId, playerEntity, killerEntity, killer); } override void EOnInit(IEntity owner) { /* code here */ super.EOnInit(owner); SCR_BaseGameMode gameMode = SCR_BaseGameMode.Cast(GetGame().GetGameMode()); if (!gameMode) return; gameMode.GetOnPlayerKilled().Insert(OnPlayerKilled); } } -
WorldEditor makes wrong override function for OnPlayerKilled
Depechivo posted a topic in Arma Reforger - Configs & Scripting
I try create OnPlayerKilled override from GameMode_Editor_Full by pressing "+" in Script section, but World Editor makes: "override void OnPlayerKilled(int playerId, IEntity playerEntity, IEntity killerEntity, Instigator killer)" and in SCR_GameModeEditor we have: "override void OnPlayerKilled(int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)" that why i have error when compile script (Overloaded function 'OnPlayerKilled', argument 'killer' is not compatible with prototype argument type or spec 'Instigator'). How can i unlock function modify in script editor to add "notnull" in created function or make another actions to resolve this problem?