textmanipulator, attack formulas

This forum is currently in read-only mode.
From the Asset Store
Zombie attack is a survival game, where you have 2 types of games: Killer and survival.
  • 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.)


  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)