textmanipulator, attack formulas

For questions about using Classic.

Post » Tue Aug 30, 2011 6:38 am

hi again, I have a few more questions that I haven't been able to find answers to in the forums.

first, for the text manipulator object, and the write text action, is it possible to combine the two?
i'm trying to use an .ini file to work with the dialogue in my game, since it seems to be a good method to use. however, I'm also trying to have the 'appear as though a character is talking' effect that's generated by the write text action. the code I have only works with the set text action.


second, I'm trying to come up with some formulas for attack damage. I've got a rough system currently set up for basic damage, but I'm stumped at how I could set something up for a critical hit chance.
i figure a variable called 'luck' or something would be used to increase a % chance for critical to activate, which would double the final output. i'm just not sure how to add it into the damage formula. (my math skills are very very rusty, I haven't done any complicated formulas since high school. hoping they'll come back to me as I work on this!)

any help would be appreciated. thank you!

(please excuse the mess in the file, i'm in the process of putting the combat system together. attack formulas can be found in the birry event sheet under stats, and dialogue doohickeys can be found under global event sheet, chat.)

Posts: 4
Reputation: 458

Post » Tue Aug 30, 2011 7:12 pm

The write txt isn't working because it is being started every frame.

In the "global events" event sheet on event 22 disable this action:
Chatbox: Set text to TextManipulator.GetRight(TextManipulator.GetLength-3)

and add a subevent to event 22:
+ MouseKeyboard: On key Space pressed
-> Chatbox: Write text TextManipulator.GetRight(TextManipulator.GetLength-3) at 1 letter per 1 milliseconds

Now drag event 24 right above event 20.

For the critical hit you could try something like this:

if random(101) less than or equal to Luck
then critical hit

A luck of 0 will never cause a critical hit.
A luck of 10 will be a %10 chance of a critical hit.
A luck of 100 will always be a critical hit.
Posts: 5,556
Reputation: 85,325

Post » Tue Aug 30, 2011 7:20 pm

Check this dialogue tutorial out:
It uses the string tokenizer object.

It might be what you are looking for.

Edit: Of course I meant the STRING MANIPULATOR object.Urled2011-08-30 19:20:51
Posts: 413
Reputation: 2,512

Post » Tue Aug 30, 2011 9:01 pm

the fiddling with the text code worked like a charm, thank you!

i'll try implementing that system in the combat, it shouldn't be too hard.

sorry, but i already have a realtively simple system for dialogue set up. i already actually downloaded and had a look at that file while i was trying to decide which one was best for me. it's a nice system though!amicable2011-08-30 21:01:31
Posts: 4
Reputation: 458

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests