Sapphire Action System IV

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Khas, Sep 16, 2012.

    Tags:
  1. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    However I have still one question how get this number to specific variable ?
     
  2. kyoui

    kyoui Villager Member

    Messages:
    15
    Likes Received:
    9
    First Language:
    Dutch
    Primarily Uses:
    RMVXA
    @LynX


     



    $game_variables[m]=$game_map.events[n].enemy.hp


    Where m is the index of the variable you want to assign the data to.


    Also, thanks Kyuukon, saves me the trouble of figuring it out myself  :) . I was just about to add a healthbar to a boss.
     
    LynX likes this.
  3. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    Hmm its weird man I put in Enemies max Hp of this enemy like 10 and Im getting number 25 in variables... why ? 
     
  4. kyoui

    kyoui Villager Member

    Messages:
    15
    Likes Received:
    9
    First Language:
    Dutch
    Primarily Uses:
    RMVXA
    Hmm odd... for me it worked like a charm. Are you sure you referring to the right event?
     
    Last edited by a moderator: Jul 8, 2016
    LynX likes this.
  5. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    Yeah it some bug i think from sas maybe I get the data too early. Because first of the Enemy is regular Autostart event which say something then he turn Selfswitch where there is Enemy setup hmm maybe that why. I put few 0,2 wait before gattering the data and working.
     
  6. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    Btw, Kyoui is there a way to heal enemy? using this formula:
    $game_map.events[x].damage_enemy(value)   ??
    EDIT:


    Ok I used this command... and it's working for healing enemy.


    $game_map.events[1].enemy.hp += 1
     
    Last edited by a moderator: Jul 8, 2016
  7. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    Hi it's me again I have a question is there a way to get data from "Recover" count to the variable from hero ? 


    by recover I mean the point where you cant attack use skills etc.
     
     
    Last edited by a moderator: Jul 10, 2016
  8. kyoui

    kyoui Villager Member

    Messages:
    15
    Likes Received:
    9
    First Language:
    Dutch
    Primarily Uses:
    RMVXA
    @LynX Do you mean the remaining recover time before you can cast the next spell?


    An question of my own: is there a way to make an enemy/event cast a skill by script call?
     
    LynX likes this.
  9. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    Yup but i started analissing the saphire code and finally figured out that it was a $game_variables[651]=$game_player.recover 
    :p  Btw Kyoui did you find a way how to get life(to variable) from the enemy which was last attacked ? or this is impossibru :D ?
     
  10. kyoui

    kyoui Villager Member

    Messages:
    15
    Likes Received:
    9
    First Language:
    Dutch
    Primarily Uses:
    RMVXA
    Hmm... that should be doable...


    I'd say search for "perform_damage(char)" in the script and look under "else"


    Just put the same  $game_variables[m]=$game_map.events[n].enemy.hp  under there I guess.


    That way it'll updat the variable everytime you hit an enemy and it'll be set to that event's current hp.
     
    Last edited by a moderator: Jul 12, 2016
    LynX likes this.
  11. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    ok I find something like this but...

     for event in $game_map.enemies
            if (event.px - px).abs < event.cx && (event.py - py).abs < event.cy
              next if event.enemy.static
              perform_damage(event) and $game_variables[651]=$game_map.events[event].enemy.hp

    but it didnt take the enemy hp to the variable actualy it did nothing :(
     
  12. kyoui

    kyoui Villager Member

    Messages:
    15
    Likes Received:
    9
    First Language:
    Dutch
    Primarily Uses:
    RMVXA
    I was talking about this part of the script


    def perform_damage(char)
    if @cast_by_enemy
    actor = $game_actors[1]
    already_dead = actor.dead?
    actor.add_state(@state)
    $game_temp.reserve_common_event(@common)
    actor.perform_collapse_effect if actor.dead? and !already_dead
    actor.result.clear
    char.animation_id = @skill.animation_id
    char.set_direction(10-@direction)
    damage = @power + @skill.power
    damage += rand(damage*Sapphire_Core::Damage_Random).to_i
    $game_player.skill_damage_hero(damage)
    else
    char.animation_id = @skill.animation_id unless char.enemy.object
    $game_temp.reserve_common_event(@common)
    damage = @power + @skill.power
    damage += rand(damage*Sapphire_Core::Damage_Random).to_i
    char.skill_damage_enemy(damage,true) unless char.enemy.skl_invincible


    So the change i would make to that would then be:


    def perform_damage(char)
    if @cast_by_enemy
    actor = $game_actors[1]
    already_dead = actor.dead?
    actor.add_state(@state)
    $game_temp.reserve_common_event(@common)
    actor.perform_collapse_effect if actor.dead? and !already_dead
    actor.result.clear
    char.animation_id = @skill.animation_id
    char.set_direction(10-@direction)
    damage = @power + @skill.power
    damage += rand(damage*Sapphire_Core::Damage_Random).to_i
    $game_player.skill_damage_hero(damage)
    else
    char.animation_id = @skill.animation_id unless char.enemy.object
    $game_temp.reserve_common_event(@common)
    damage = @power + @skill.power


    $game_variables[m]=$game_map.events[n].enemy.hp


    damage += rand(damage*Sapphire_Core::Damage_Random).to_i
    char.skill_damage_enemy(damage,true) unless char.enemy.skl_invincible


    Not sure if this works since i don't have time to try it but I imagine i would look somewhat like this.
     
    LynX likes this.
  13. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    Thanks man Im gonna dig a little with it. Hover I thinkt the main problem is the "[n]" maybe there should be diffrent value.
     
  14. kyoui

    kyoui Villager Member

    Messages:
    15
    Likes Received:
    9
    First Language:
    Dutch
    Primarily Uses:
    RMVXA
    Oh sheep, I thought i changed it to char... whoops...  :p


    But tbh i'm also not sure if char works but it seemded to be the most logical one to try out.


    $game_variables[m]=$game_map.events[char].enemy.hp


    Would be my guess then.
     
    Last edited by a moderator: Jul 12, 2016
    LynX likes this.
  15. SkottGaming

    SkottGaming Villager Member

    Messages:
    16
    Likes Received:
    1
    Location:
    Sweden
    First Language:
    Swedish
    I
     
    Last edited by a moderator: Sep 13, 2016
  16. SkottGaming

    SkottGaming Villager Member

    Messages:
    16
    Likes Received:
    1
    Location:
    Sweden
    First Language:
    Swedish
    Another pic of how it looks.
     
    Last edited by a moderator: Sep 13, 2016
  17. bersauron

    bersauron Warper Member

    Messages:
    3
    Likes Received:
    1
    First Language:
    Turkish
    Can anyone help me to create skill that heal myself. Im using that sapphire action system. I dont know much things so if u guys can help me i would be grateful
     
    SkottGaming likes this.
  18. SkottGaming

    SkottGaming Villager Member

    Messages:
    16
    Likes Received:
    1
    Location:
    Sweden
    First Language:
    Swedish
    How do I make a heal skill in this script?
     
  19. ALEXjo.

    ALEXjo. Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    Swedish
    here is a thing with this awsome system! but there is a issue if you stand in middle of to events thanks by the full pixel movement!


    both events will trigger! is there a way it can only trigger once or i can make a event longer then 32 x 32 pixels.


    like 96 x 32 pix long event? how can i do that
     
  20. Mooshry

    Mooshry Ariana Grande has consumed my very existence help. Veteran

    Messages:
    362
    Likes Received:
    142
    Location:
    Your Air Conditioner
    First Language:
    Cow
    Primarily Uses:
    RMMV
    How do i add a heal skill? It crashes when i open the menu with a heal skill.
     

Share This Page