Unreal 4 - How to pass a Int Var in Actor to HUD? - game-engine

Im new to Unreal, im trying to make a 2d Click game, for this i create an Actor and when i click this actor, it add 1 to my var, this is working, the problem is i trying to show this var in the HUD, but a can't do, I searched tutos but its only for players character, never to actor, so im bit lost. Anyone know how to do it? in the game i dont have a player, since its only clicks, so i think this might be the problem too.

add a function getHP to this actor that return the hp value as string.
in HUD add function getActor to access this actor, then bind the text of HUD with getActor.getHP

Are you absolutely sure this event is running? Add a breakpoint to the event and see if you hit the breakpoint.
If the event is running then you should definitly see something printed to the screen. Check in the top right for a tiny number in light blue which will only stay on screen for a default of 2 seconds. Click the down arrow on the Print String node and change the time to something higher and maybe the colour to something more visible.
If the event isn't running (which I think is likely), try following this tutorial to enable Click Events on a custom PlayerController.

Related

How to make a run button (GML)

I'm making a game in game maker and I've looked every where, but all the answers are no help. I've tried for about an hour to no avail. If some one could help that would be great (I'm new to programming).
I think your question is not descriptive enough if you're trying to create something like a start button;
create a sprite ("START")
make an object for that sprite
create two rooms (mainmenu, level1)
add a click event to obj_start
use this code: room_goto(room_level1);
place start object to the room_mainmenu
but if you're trying to make a pause-start type of run button you can either use the complicated way(google;gml pause) or cheat with screenshotting your level1 and using it for the main menu background to hide the main menu.

Photoshop CS 2015.5 looses Object when moving

After updating my photshop version to 2015.5, suddenly PS looses the layer-focus when trying to move an object without directly hitting it . like i have a car and a track, car is selected, but out of screen. when i try to click an drag the car but hitting the track with the mouse (because the car ist out of the screen bounds), photoshop automatically selects the track in the layer selection and i move the track not the car. it was not like that in PS 2015.
How can I stop PS from doing so?
I think you did't check [Auto select] option
Click move tool
It will be show auto select you can check the checkbox.
then try it I hope this helps you.

wacom and myscript set handwritng recognition function

im not sure if its the right place to put my question, but i think maybe get an answer here.
the last few days thinking about a way to make μυ work easier.
What I want is to write by hand and convert into text on the computer.
namely when I am on a page with multiple text forms like this im writing now,
when i choose a text form with a pen (like wacom graphic tablet) write on a surface and the automaticaly when i stop or pressing a button the text turn into text in the form.
my title say about wacom because i found bamboo scribe.. if someone uses this please explain me whats can do and if can work for me.
i test myscript. with fullscreen tool wich you can write everywhere on the screen is easiest but when you finish you have to press a button on the program to insert the text in the selected area.
so my question is there any way to press that button with the button placed on stylus pen?
i saw that you can set functions when a button clicked on the wacom tablet or on pen.
i have not bought yet anything because im searching if is out there anything could do what i want better. something made for that particular job
Thanks and sorry for my bad english..

Drawing Interactive paths in JavaFX 8?

(please excuse any mistakes in the way of questioning/ formatting the question since I'm new)
[Please Note that I cannot post code here as yet, and FXML code isnt worth posting right ?
Also, my GUI programming experience before this is very little... I picked up JavaFX 8 first because I use Java, and heard that FX >> Swing in many ways]
I am trying to make a GUI that allows the user to input the NumberLink puzzle numbers (through mouse action events), and then, displays the puzzle in a grid with features to draw a path, and undo it. This is almost exactly the same functionality as in Numberlink on Nikoli. The puzzle is quite interesting, and these are the rules. The goal of the UI is for the user to interactively solve the puzzle by drawing lines,etc, just as on Nikoli's site. The solver will be a later addition.
In my project, I have a Stage in which a setup Scene prompts user for rows and columns (to take size of puzzle),
next, it generates an empty grid (I'm thinking of using a GridPane here), and the user clicks the squares to enter the numbers into the square. this phase isnt a problem if I use TextFields and mouse listeners and store info in a grid... the next phase is what I'm stuck at... unless I know exactly how to do that, I cant make progress...
in the third stage, I have to display the numbers to the user just like on the Nikoli site (the highlighting number pairs on mouse hover is a necessary feature too, which I think I can handle with CSS).. and the user should draw paths between the numbers, just as on that site ( I thought VLineTo and HLineTo classes would be suitable.. but I'm not sure, and cant find any alternatives) Please help on this ...
So with this in mind, I made FXML based dummy gui layouts to test if my ideas work...
and I cant get the GridPane to have lines drawing atop it (meaning, I cant place Line objects like HLineTo on top of the grid panes).... is there any other way to do what I need to do ?
I also thought of making multiple Canvas objects in a grid (each square is its own canvas), having the numbers as Text objects, and a Canvas on top of the grid with transparency ON, and having them both on a StackPane, but then, the StackPane's children will not be synchronised.
Please help point me in the right direction, thanks (tell me if I'm missing something basic, which I think I am).
You can wrap the GridPane in an AnchorPane, then use getChildren().add(Node node).
Assuming your controller has defined <AnchorPane fx:id="anchorpane"...> and implements Initializable
#FXML private AnchorPane anchorpane;
#Override
public void initialize(URL location, ResourceBundle resources) {
Line line = new Line(double startX, double startY, double endX, double endY);
anchorpane.getChildren.add(line);
}
NOTE: The line should actually be dependent on mouse events, so it really shouldn't even be in your initialize method; but it should help you get started with what you want to do.
HTH

vb.net Display/Focus/Show Form on top of PC Game

What I am trying to accomplish is this: I want to be able to press the F5 key on my keyboard, while playing a PC game, to show (bring forward, focus, etc.) my program. My 3 attempts so far have failed. Any idea on how I could accomplish my goal? Similar posts on other forums say to set the form's key preview to true and use on keyPress... which failed.
Thank you,
Anonymous
Here is the question about capturing global mouse / keyboard, you can try using it in VB.NET and test it, though I guess you only don't want to be caught while playing games during work. ;)
Also I definitely suggest this link from it. :)