Pre-made (Yanfly's) Action Sequence Sharing and Discussions

● ARCHIVED · READ-ONLY
Started by Blue001 2126 posts Page 98 of 107 View original ↗
  1. chobokid said:
    But is there a way for a SV actor or battler to do a 180 or 360 within an action sequence?
    There's no such command in Yanfly's action sequences. Various other people on these forums have made extensions for these plugins - you might get better results starting your own thread asking about this, as it's not really related to the topic of pre-made action sequences.

    The alternative would be to make an animation of the character moving in the way you want, and call that within an action sequence.
  2. Hey, does anyone know how one would go about playing 1 of 3 sounds chosen at random? I've tried multiple options but either nothing happens or I get an error that says the sound effect was failed to load, and it always seems to be the first one in the list too meaning i'm apparently not even doing the "random" part right :( heres a few variations ive tried so far to no avail..

    <whole action>
    sound = ["sound1","sound2","sound3","sound4"][~~(Math.random()*4)];
    se : sound
    </whole action>

    <whole action>
    se : ["sound1","sound2","sound3","sound4"][~~(Math.random()*4)];
    </whole action>

    <whole action>
    const list = ["sound1","sound2","sound3","sound4"]
    se : ({name: `${list[~~(Math.random()*list.lenght)]}
    </whole action>

    I've also tried having the sound be chosen in the setup action but i'm obviously doing something wrong here... I'm just not sure what :(
  3. Hey, does anyone know how one would go about playing 1 of 3 sounds chosen at random? I've tried multiple options but either nothing happens or I get an error that says the sound effect was failed to load, and it always seems to be the first one in the list too meaning i'm apparently not even doing the "random" part right :( heres a few variations ive tried so far to no avail..
    I'm still learning when it comes to action sequences but what about using variables? The first thought that came to mind was if you could hold certain sounds to play in a variable then call that variable through a random.
  4. JPlaysan said:
    I'm still learning when it comes to action sequences but what about using variables? The first thought that came to mind was if you could hold certain sounds to play in a variable then call that variable through a random.
    Thats kind of what I was trying to do with the first example.. with sound being the name of one of my variables, I also tried replacing sound with "var 10" as 10 is the number of the variable in the database, but than i get an error saying cant find sound "var%"... I'm not sure maybe the "se:" function just isnt designed to work with variables :/
  5. Kaymon145 said:
    maybe the "se:" function just isnt designed to work with variables :/
    Correct, you must use the format of the commands as they're described in the action sequence documentation.

    Nothing you type into an action sequence is JavaScript unless it says so - therefore, your first line "sound = ..." will be skipped as an invalid command.

    Then, if you look at the documentation for the "se" command, you see that it will automatically turn the first argument into a string for the filename, and you probably don't have an SE with the filename "sound" (you also have an incorrect space before the colon).

    To do things like this, you can use the "eval: " command to execute JavaScript commands. So you can do an "eval: " to set a variable equal to a randomly determined filename, then another "eval: " to call the AudioManager.playSe function which will accept your variable.

    The other alternative is to use an "eval: " to create a variable set to a random value, then:
    Code:
    if random==1
        se: sound1
    else if random==2
      se: sound2
    end
    etc.
  6. ATT_Turan said:
    Correct, you must use the format of the commands as they're described in the action sequence documentation.

    Nothing you type into an action sequence is JavaScript unless it says so - therefore, your first line "sound = ..." will be skipped as an invalid command.

    Then, if you look at the documentation for the "se" command, you see that it will automatically turn the first argument into a string for the filename, and you probably don't have an SE with the filename "sound" (you also have an incorrect space before the colon).

    To do things like this, you can use the "eval: " command to execute JavaScript commands. So you can do an "eval: " to set a variable equal to a randomly determined filename, then another "eval: " to call the AudioManager.playSe function which will accept your variable.

    The other alternative is to use an "eval: " to create a variable set to a random value, then:
    Code:
    if random==1
        se: sound1
    else if random==2
      se: sound2
    end
    etc.
    Oh man I didnt even know about the eval function... Looks like I need to brush up on my reading!! Thanks so much, I finally got it working the way I wanted to :) No more hearing the same HIIYAH! after every. single. attack. Lol thanks again you've opened up a lot of new possibilities for me!
  7. Hey folks, this may be an already answered question but I can't seem to find a good answer so I've resorted to asking here: I'm trying to make a skill that hits 3 random enemies but it sometimes will hit a dead target that was killed by a previous hit and wastes one of the three hits. Any idea how to make it so that hit 2 and 3 can't choose the dead target? I've seen 'Death Break' suggested as an option but that completely stops the action sequence and I'd like it to continue as long as at least one living target remains. Including what I have currently for reference. I have the ability scope set to 1 random enemy, so I've included the 'action effect' three times total.

    <setup action> immortal: targets true motion standby: user hide battle hud </setup action> <target action> move user: Point, 200, 350, 30 wait 30 motion attack: user wait for animation action effect action animation: target wait: 45 action effect action animation: target wait: 45 action effect action animation: target wait: 45 motion walk: user Wait 10 face user: forward wait for animation wait for movement death break </target action> <follow action> immortal: targets false opacity not focus: 100%, 30 wait for opacity show battle hud </follow action>

    Also, I know the animation is a little janky, but I'd like to make the ability work as intended before worrying about aesthetic polish. Hehe. Any tips or suggestions are very much appreciated. Thanks in advance!
  8. Kanetsugu21 said:
    Any idea how to make it so that hit 2 and 3 can't choose the dead target?
    RPG Maker's targeting doesn't do that on its own, so you need to code it in. Do you care whether the attack can hit the same enemy twice, so long as it hasn't taken enough damage to die yet? Or do you want it to be forced to 3 separate enemies if possible?
  9. Did you try removing the immortal stuff?
  10. Aesica said:
    Did you try removing the immortal stuff?
    That's a good thought - what will happen, though, if the first attack, or first two, kill the only remaining targets in the troop, and then there are more commands?

    At the very least, there would be weird-looking shuffling about from the movement commands, and the effects and animations on a target that doesn't exist might glitch out.

    Incidentally, @Kanetsugu21, that death break at the end of the target action is pointless.
  11. Only way to find out is to give it a try. I haven't done yanfly action sequences in over a year though.
  12. Hi everyone, I've been working on this action sequence most of the day now and I'm so close to getting this quick time event to work the way I want to, if the player presses the ok key at the right time the player gets an extra hit in, I even managed to get it to switch to a different battler sheet and everything, The only problem is the player can button mash and pretty much nail the quick time event every time. I'm trying to use a switch to disable the quicktime event from running if the ok button is pressed too early, I have a feeling I'm formatting something wrong with my if statements, or my actions are all running together in the target action section, I'm not sure. I'm just kind of at a loss at this point, like I said everything works great but I'd really like to be able to disable button mashing if possible.. Oh and the plugin I'm using for QTE is right here :

    Quick Time Events (R2 26/11)
    I appreciate any advice I can get on this, I've been messing with it all day and I'm so close but at this point I feel like I'm just making a mess of my code and not making progress (I tried to remove some of what wasn't relevant to shorten the post but its still kind of a mess)

    <setup action>
    hide battle hud
    change switch 35: on
    eval: ran = [1,2][~~(Math.random()*4)];
    display action
    camera focus: user
    zoom: 250%, 20
    wait for zoom
    camera focus: target
    zoom: 150%, 20
    camera offset: right, 50
    end
    immortal: targets, true
    </setup action>

    <target action>
    if eval: Input.isTriggered("ok") {
    change switch 35: off
    FLASH SCREEN: RED }
    end
    move user: targets, front, 20
    wait for movement
    motion attack: user
    wait: 10
    attack animation: target
    wait: 10
    if eval: $gameSwitches.value[35] == true {
    eval: $gameMap.QTE(["normal"],20,["ok"],true)
    if eval:$gameMap.getQTEResult() === "success"
    FLASH SCREEN: WHITE
    }
    end
    wait for animation
    action effect
    wait for animation
    wait for movement
    wait: 5
    if eval:$gameMap.getQTEResult() === "success"
    {
    eval: $gameActors.actor(1).setBattlerImage('LucasLarge2')
    eval: $gamePlayer.refresh()
    motion attack: user
    wait: 10
    attack animation: target
    wait for animation
    action effect
    eval: $gameActors.actor(1).setBattlerImage('LucasLarge')
    eval: $gamePlayer.refresh()
    }
    end
    </target action>

    <follow action>
    zoom: 100%, 20
    move user: home, 20
    wait for movement
    show battle hud
    </follow action>

    EDIT

    I forgot to menton the red flash effect is activating even when I dont press 'ok' so I know I'm doing something wrong there..
  13. You should start putting the code you post into the code tags (the </> on the top row). It preserves your indents, and you don't risk values inside of brackets getting turned into BBCode.

    I'm not familiar with that QTE plugin, so I'm just skimming, but this:
    Kaymon145 said:
    if eval: Input.isTriggered("ok") {
    change switch 35: off
    FLASH SCREEN: RED }
    end
    move user: targets, front, 20
    wait for movement
    motion attack: user
    wait: 10
    attack animation: target
    wait: 10
    if eval: $gameSwitches.value[35] == true {
    eval: $gameMap.QTE(["normal"],20,["ok"],true)
    if eval:$gameMap.getQTEResult() === "success"
    FLASH SCREEN: WHITE
    }
    end
    is all wrong.

    1 - You can't put action sequence commands into random places. If eval isn't at the start of the line, it doesn't mean anything. So saying if eval: is already invalid. Then...

    2 - Conditionals already use JavaScript. So there's no reason for you to try to use an eval there, you'd simply type if Input.isTriggered("ok"). That's why your conditionals all aren't working.

    3 - Action sequences don't use braces, they use the conditional and then end. So putting that open brace at the end of that first line doesn't help anything, and the same is true for all the other close and open braces - as far as the action sequence is concerned, those are errors.

    Hopefully all of that gets you closer! You might want to read some further examples of functioning action sequences to get a better grasp of their syntax. The very beginning of this thread isn't great for that because a lot of them weren't posted in code tags and they're unintelligible gibberish - but there are other threads and YouTube videos with readable stuff.
  14. ATT_Turan said:
    You should start putting the code you post into the code tags (the </> on the top row). It preserves your indents, and you don't risk values inside of brackets getting turned into BBCode.

    I'm not familiar with that QTE plugin, so I'm just skimming, but this:

    is all wrong.

    1 - You can't put action sequence commands into random places. If eval isn't at the start of the line, it doesn't mean anything. So saying if eval: is already invalid. Then...

    2 - Conditionals already use JavaScript. So there's no reason for you to try to use an eval there, you'd simply type if Input.isTriggered("ok"). That's why your conditionals all aren't working.

    3 - Action sequences don't use braces, they use the conditional and then end. So putting that open brace at the end of that first line doesn't help anything, and the same is true for all the other close and open braces - as far as the action sequence is concerned, those are errors.

    Hopefully all of that gets you closer! You might want to read some further examples of functioning action sequences to get a better grasp of their syntax. The very beginning of this thread isn't great for that because a lot of them weren't posted in code tags and they're unintelligible gibberish - but there are other threads and YouTube videos with readable stuff.
    Thank you again, I was wondering if there was a way to shrink down my code posts a bit, and that did help me out a lot and i was able to clean up a bunch of my code and get things running a bit smoother, the one line I'm still having trouble with is this :
    if Input.isTriggered("ok") FLASH SCREEN: RED change switch 35: off end
    I still can't get this to trigger for some reason, I'm turning the switch on in setup actions and I want it to turn off as soon as the ok key is pressed but no matter if I hold the key down or mash the button the red flash isn't triggered and the switch isn't turned off. Other than that I removed all the brackets and unnecessary eval:'s and it looks a lot smoother!
  15. Kaymon145 said:
    I still can't get this to trigger for some reason
    As I said, I haven't worked with the other plugin you're using, so take this with a grain of salt - but I do not think you can do this the way you're trying to (and I'm not sure why you are trying to).

    Usually, people use Input.isTriggered() in a parallel event that's running every game frame (60 times a second). That will pick up when the player presses the referenced button.

    In your case, you're putting it in the middle of the skill, and isTriggered() only returns true for a single frame after the button is pressed, so the odds of the player hitting it at exactly the right time for this to work are nearly impossible. Especially since I don't see anything leading up to it in your action sequence that would queue them to do so. But even if they were, the timing of 1/60th of a second is impractical.

    It seems like you should be using the QTE plugin to display something on the screen and wait for/record the player's input. Isn't that what you installed it for? :wink:
  16. ATT_Turan said:
    As I said, I haven't worked with the other plugin you're using, so take this with a grain of salt - but I do not think you can do this the way you're trying to (and I'm not sure why you are trying to).

    Usually, people use Input.isTriggered() in a parallel event that's running every game frame (60 times a second). That will pick up when the player presses the referenced button.

    In your case, you're putting it in the middle of the skill, and isTriggered() only returns true for a single frame after the button is pressed, so the odds of the player hitting it at exactly the right time for this to work are nearly impossible. Especially since I don't see anything leading up to it in your action sequence that would queue them to do so. But even if they were, the timing of 1/60th of a second is impractical.

    It seems like you should be using the QTE plugin to display something on the screen and wait for/record the player's input. Isn't that what you installed it for? :wink:

    haha yeah I did try and switch it from isTriggered to isPressed and noticed it does seem to only be triggering once, I was thinking of setting up some kind of loop to check for presses every 60 frames before the actual action sequence but this is all getting pretty complicated, I might just have to rethink my strategy or find a different plugin. The plugin itself works great I just wanted a way to make it harder by disabling it if the player presses "ok" too early ( the actual timed hit is like 20 frames I think) its supposed to be a precise timing thing but as it is the player can just button mash "ok" and pass the QTE every time, except for that one rare time I hit the 1/60th second button check before hand lol
  17. Kaymon145 said:
    ( the actual timed hit is like 20 frames I think) its supposed to be a precise timing thing but as it is the player can just button mash "ok" and pass the QTE every time
    I couldn't read all of your post. But for this, you can control how much time the player has for the QTE.

    If you read the documentation for it, it's the second number in:
    Code:
    $gameMap.QTE(mode,duration,sequence,visible,x*,y*,opacity*,width*,height*,wrongInput*,showTime*)
    duration.

    The author even gives an example of how to do this in the first post, where you have a timed window to make the skill be a critical hit.

    But if you have any more questions about this, it really should go either in the thread for the QTE plugin or in a new Plugin Support thread, as it's off-topic for this one.
  18. My Close Attempt at Trying to Replicate Dark Blade(Cless's Hi-Ougi from Tales of Phantasia)
    <target action>
    CAMERA FOCUS: user
    wait: 10
    -----<movement>------
    battleback 3 add: battlebacks1, Speedlinevertical
    battleback 3 scroll speed y: -300
    camera screen: user, base top, 15
    zoom: 200%, 15
    ------Charge Skill-------
    move user: target, front, 20
    motion attack: user
    action animation
    wait for animation
    motion attack: user
    action animation
    wait for animation
    opacity not focus: 0, 20
    move user: target, front, 5
    wait for opacity
    opacity user: 100%, 5
    wait for opacity
    motion victory: user, no weapon
    action animation
    action effect
    jump user: 500%, 29
    jump target: 500%, 30
    wait for jump
    se: Earth5
    shake screen: 3, 9, 10
    motion guard: user, no weapon
    ani wait: 5
    action effect
    immortal: target, false
    Wait 30
    battleback 3 remove
    </target action>

    <follow action>

    opacity not focus: 100%, 60

    wait for opacity

    </follow action>
  19. Hey, could I get that battleback from you? This looks cool
    Ajx5 said:
    My Close Attempt at Trying to Replicate Dark Blade(Cless's Hi-Ougi from Tales of Phantasia)
    Spoiler
    <target action>
    CAMERA FOCUS: user
    wait: 10
    -----<movement>------
    battleback 3 add: battlebacks1, Speedlinevertical
    battleback 3 scroll speed y: -300
    camera screen: user, base top, 15
    zoom: 200%, 15
    ------Charge Skill-------
    move user: target, front, 20
    motion attack: user
    action animation
    wait for animation
    motion attack: user
    action animation
    wait for animation
    opacity not focus: 0, 20
    move user: target, front, 5
    wait for opacity
    opacity user: 100%, 5
    wait for opacity
    motion victory: user, no weapon
    action animation
    action effect
    jump user: 500%, 29
    jump target: 500%, 30
    wait for jump
    se: Earth5
    shake screen: 3, 9, 10
    motion guard: user, no weapon
    ani wait: 5
    action effect
    immortal: target, false
    Wait 30
    battleback 3 remove
    </target action>

    <follow action>

    opacity not focus: 100%, 60

    wait for opacity

    </follow action>
  20. Well, Here you Go... Speedlinevertical.png