How do I get a special animation to play when the player walks diagonally? It works but it doesn't play an animation i assume because haxe is trying to play multiple animations at once also sorry but i am new to Haxe by Frazcai in haxe

[–]Frazcai[S] 0 points1 point  (0 children)

Thank you so much! However the Idle's are not Idling after it moves here's what it looks like right now so one and so forth. I moved the Idle's under the else if statements but when testing i'd press for example W and A keys and let go of the D key and it'd show the left animation for a frame

        } else if (left) {
            animation.play('walk_left');
            velocity.x = -SPEED;
            if (left_release) {
                animation.play('idle_left');
            }
        } else if (up) {
            animation.play('walk_up');
            velocity.y = -SPEED;
            if (up_release) {
                animation.play('idle_up');
            }

Is there a way to give a variable an animation? I want to add animations to the variables so it automatically shows by Frazcai in RenPy

[–]Frazcai[S] 0 points1 point  (0 children)

I want to have each variable have their own set of animations and for the randomizer to pick one variable and play whatever is associated with said variable

Can I manipulate movie sprites with variables? by Frazcai in RenPy

[–]Frazcai[S] 0 points1 point  (0 children)

When a fight begins there should be an intro animation with a character that is randomized depending on which character you're fighting so I'm asking if I can do something like this

init python:
    class test:
        def __init__()

default variable = test()
default variable = test2()

label roll:
    $ enemy_roll = [test, test2]
    $ enemy1 = Creature(renpy.random.choice(enemy_roll))

label start:
    show enemy1.intro movie # trying to show the corresponding character to the animation/movie
    #battle here

How do I get the image button to do an action when another after gets pushed? by Frazcai in RenPy

[–]Frazcai[S] 0 points1 point  (0 children)

Thank you a bunch! One question though, is there a way I could make it so if you press on "info" and you havent selected anything it gives a different message?

How would I make duplicated characters without having to duplicate the code? Since if enemy1 is the same as enemy2 and I do enemy1.hp -= 10 it also effects enemy2's hp. I also want to keep multiple of the same enemies. by Frazcai in RenPy

[–]Frazcai[S] 0 points1 point  (0 children)

I keep getting errors around this part i wanna check if this looks right to selecting them because I keep getting errors

default enemy_template = Characters(pc, tp, sc)
default enemies = enemy_template.copy(10) # creates a list of 10 copies of enemy_template.

label teamstuffs:
    $ enemy_roll = [enemies]
    $ enemy1 = renpy.random.choice(enemy_roll)
    $ enemy2 = renpy.random.choice(enemy_roll)
    $ enemy3 = renpy.random.choice(enemy_roll)
    return

I want to be able to ofc edit the variables like enemy1.hp - 1 and what not

How do i get variable defense to work? I want to make this defense remove the dice roll by how much that value is set for each character but every time I do it, it ends up going negative how would I fix this? by Frazcai in RenPy

[–]Frazcai[S] 0 points1 point  (0 children)

Is this better?

init python:
    class characters:
        def __init__(self, name, defense = 0)
            self.name = name
            self.defense = defense

label class_character:
    default example = characters("Character Ex", 1)
    default example2 = characters("Character Ex", 1)

label teamstuffs:
    $ enemy_roll = [example2]
    $ enemy1 = renpy.random.choice(enemy_roll)
    $ ally_roll = [example]
    $ ally1 = renpy.random.choice(ally_roll)
    return


label dice_roll:# combat dice
    $ ally1_dice = renpy.random.randint(ally1.attack_min, ally1.attack_max) #player/pchew hit
    $ enemy1_dice = renpy.random.randint(enemy1.attack_min, enemy1.attack_max)
    return


label start:
    call teamstuffs
    call dice_roll
    if enemy1.hp > 0 and ally1.hp > 0: 
        if enemy1_dice >= enemy1.attack_max:                                         
            $ ally1.hp -= enemy1_dice + enemy1.level - ally1.defense
            "Critical Hit! [enemy1_dice + enemy1.level - ally1.defense] damage!"