Login to reply

13 posts


by Ethael 2 years ago
Hi, i decided to open a new thread for my first program, because i don't want to open more than 2 threads for one project. I want to post here my questions for one App and for the learning progress. I hope this is okay.
My next question: This time i want to create a random number and change my label to this number. I found an random int block where i can put my random number. The problem is now, that i don't know how to change the label.
Here are my screenshots:




I hope you can help me again, Rebin ;)
Greetings
Ethael (Alex)

by Rebin 2 years ago
Hi Alex,
No worries, you can open as many threads as you wish 🙂

This is done quite easily, go to UI > Control > Set Properties, now connect the label reference to the "Object (Get)", then right click on the info button and click on Text, now connect the random int to the Text port, and call Set Control Properties from the button click event like shown below



Korduene Developer
by Ethael 2 years ago
Nice, it's really easy, thanks ;)
I'm happy with the random numbers. Now i can do a simple click game, maybe with rpg elements, but, i need to check it out. My first program in C++ was a console application with random numbers and fighting with these things. Now i want to do exactly this in an windowed application with buttons and with pictures. This will be a good start to learn more about Korduene.

by Rebin 2 years ago
You're very welcome,
That sounds good, let me know if you need any help.
My knowledge of C++ is very limited, C# is my main language.

Korduene Developer
by Ethael 2 years ago
Hi Rebin, i need your help again.
This time the problem is to set variables with operators. My Enemy_HP-Variable is set. I used get > text for change the variable. I've created some variables, and now i want to use operators, but, i don't know how this works. I put some time to it, but i think it's better to ask here.
What i want: I want to have an attack button, that change the value of my Enemy_HP-Variable. Here's a screenshot to understand what i want to do:

Thanks in advance for help ;)

by Rebin 2 years ago
Hi Alex,
This can be done easily, you do not even need a variable, you can directly subtract from the label's text since Korduene takes care of the text to int conversion.
So go to Math > Subtract, and create the node, now attach A to the label's text, and in B type in amount you want to subtract, I've used 5 in this example, now like before create Set Control Properties node and set the labels text to the result of the subtract node like shown below.



You're very welcome 🙂
Let me know if you have any other questions

Korduene Developer
by Ethael 2 years ago
Hi Rebin,
works all, thanks :)
I've got a problem with my project. I've made a larger project now, but the "close form"-block causes an error. I want to close the opened 2nd form and return to my first form. I've made 3 screenshots. The first one is the whole project, the 2nd is the visual script part for the closed form, and the 3rd is on the german language, but i hope you can understand what problem i have. Here are the screens:







I hope, you can help me out. Maybe i've done something wrong.

by Rebin 2 years ago
Hi Alex,

Unfortunately I cannot replicate the issue, I can have a look at the project if you wish, you can send it to contact[at]korduene.com.

Korduene Developer
by Ethael 2 years ago
Hi Rebin.
I sent the project to contact[at]korduene.com. You can reduce the player's hp when you click on the attackbutton. The enemy will take damage and the player, too.

by Rebin 2 years ago
Hi Alex,
Thanks for sending the project, it seemed like there was numeric conversion issues in Korduene, I've fixed the bug, restart Korduene, it should automatically update, open your project, make sure to open both forms so their code is re-generated and run your project, now everything should be fine.

Let me know if you have any issues.

Korduene Developer
by Ethael 2 years ago
Hi Rebin and sorry for my late answer. I've got a problem with my internet.
I still have a problem. Wenn i open the 2nd form, it all works. But when i go back to form1, close the 2nd form and then open the 2nd form, the error comes again. I think this is the same error.
Anyway, thanks for check it out ;)

by Rebin 2 years ago
Hi Alex,
No worries, it's all good.
That actually is not related to the previous issue, this is a weird design desicison i guess.
The first time you call show form, an already created instance of form2 will be run, when you close the form, it's disposed, so the second time you're trying to run it without instantiating it.
All you need is to call New before calling show.
So create a branch node, click on the info to add two ports call new first then call show like shown below:


Korduene Developer
by Ethael 2 years ago
Hi Rebin,
works wonderful, thanks. I have now some plans for my next program. it should be useful, but not to complex. I will write a topic whether this is possible or not.
Greetings
Alex

Login to reply
;