User Tools

Site Tools


contributors:jh

Jerry Hopper

role: admin

Email: hopper.jerry@gmail.com

Twitter: https://twitter.com/jerry_hopper

BiForum: https://forums.bohemia.net/profile/735812-jerryhopper/


Some of my Cinematic adventures

ArmaReforger Cinematic Timeline howto


Up the Creek


Buckfast Lighthouse


Timelapse: Crag Point Lighthouse


My very first video in reforge


Scratchpad


//Get the entity (soldier)
GenericEntity soldier = GenericEntity.Cast(GetWorld().FindEntityByName("soldier_scripted"));


//Control the Soldier.
CharacterControllerComponent soldier_c = CharacterControllerComponent.Cast(soldier.FindComponent(CharacterControllerComponent));

// change stance
soldier_c.SetStanceChange(ECharacterStanceChange.STANCECHANGE_TOCROUCH);

// move soldier
vector direction = {0,0,1};
soldier_c.SetMovement(2, direction);


// shoot phase 1
soldier_c.SetWeaponRaised(true);
soldier_c.SetSafety(false, true);

// shoot phase 2
soldier_c.SetFireMode(2);
soldier_c.SetFireWeaponWanted(1)

RESTAPI how to use restApi

via ArkensoR (https://discord.com/channels/105462288051380224/976155351999201390/996058255010832525)

class TestCallback : RestCallback
{
    override void OnSuccess( string data, int dataSize )
    {
        Print(" !!! OnSuccess() size=" + dataSize );
        if( dataSize > 0 )
            Print(data); // !!! NOTE: Print() will not output string longer than 1024b, check your dataSize !!!
    };
}
...
auto ctx = GetGame().GetRestApi().GetContext("https://webhook.site/XXXX-YOUR-GUID-XXXXX");
TestCallback callback();
//ctx.POST(callback,"RequestPath?Argument=Something", "Hello World");
ctx.POST(callback,"RequestPath?Argument=Something", "{\"someVar\": 1337}");

FileHandle

Scripts/Core/generated/System/FileHandle.c

FileHandle file = FileIO.OpenFile("$profile:testiik.txt", FileMode.WRITE);
if (file != 0)
{
file.FPrint("A");
file.FPrint(file, "B");
file.FPrint(file, "C");
file.CloseFile();
}
contributors/jh.txt · Last modified: 2022/08/25 15:49 by jerryhopper

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki