# Unreal.js change blueprint variable

**URL:** <https://forums.unrealengine.com/t/unreal-js-change-blueprint-variable/445180>\
**Category:** Blueprint\
**Tags:** javascript, unreal-engine, UE4, Blueprint, question\
**Created:** [March 12, 2019, 5:38pm UTC](https://forums.unrealengine.com/t/unreal-js-change-blueprint-variable/445180 "2019-03-12T17:38:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FerlinDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FerlinDev](https://forums.unrealengine.com/u/FerlinDev)\
**Post date:** [March 12, 2019, 5:38pm UTC](https://forums.unrealengine.com/t/unreal-js-change-blueprint-variable/445180/1 "2019-03-12T17:38:21Z")

</div>

I have a String and int variable in my actor and I want to use and modify them using my JavaScript Script.

Here is my little function.

var makeMove = function () {

var Chess = new Chess(/_get fen from actor_/);

var bestMove = minmaxRoot( /_get depth from actor_/ , Chess , true);

Chess.ugly\_move(bestMove);

/_update fen of actor_/

};

The fen is string and depth is int.

Thank you for your help \<3
