Eventing Projectile and Freeze Skills

● ARCHIVED · READ-ONLY
Started by Hahn Deathspark 7 posts View original ↗
  1. I have a question and I wonder if these skills are possible by just eventing or it must have a script so it will work?

    So here's how I want it to work.

    1. Freeze Skill

    What happens is that with a push of a button, enemies around the character of a one tile radius will be frozen. As you can see in this image...
     

    10557291_10202712244504580_8880302929700276523_n.jpg10590649_10202712274865339_3305508957033607721_n.jpg10292438_10202712275185347_739003616609202209_n.jpg

                  RADIUS                          EXAMPLE                    AFTER FREEZE

    What I'm trying to say is that whatever enemy (Or should I just call the enemies events) that comes into that blue radius shall be frozen for a set period of time. Is this possible by eventing only or a script is needed?

    2. Projectile Skill

    Before everyone starts linking ABS or XAS or any of those complex stuff, I want to state that no, I don't want the HP bar and etc etc etc all over the map. All I want is just something that simply enables the player to shoot a projectile at an event and trap it for a certain period of time. No HP deduct or anything since my game has no HP AT ALL. Simply variables, but still, I want it to be like this:

    10511085_10202712261465004_3366980887487881248_n.jpg10295688_10202712264185072_7356476696573948035_n.jpg

      WHEN PROJECTILE IS      WHEN PROJECTILE HITS

                   SHOT                                TARGET

    Yeah whatever, but it's just a vague idea how I want it to be like. So when the projectile hits the target, it turns into ice for like example, 10 seconds then reverts back to normal. Once again, can be done with just events or a script is needed, and please don't suggest the complex ones, a simple ONE SCRIPT, script only. Or if there's two that needs to work together fine, just get the job done :/
  2. the problem is not the result, it's the targeting.


    You can freeze an event simply by giving it a "freeze"-page conditioned to a script where the event has the frozen graphic and does nothing.


    However, the problem is to determine which events should get switched to the frozen status.


    That can either be done with a parallel process checking the positions of all events, or with a script that offers additional event triggers and event functions.


    Which way is best depends on the number of events and what other functions you need.
  3. The last time I did it was using a Yanfly button script to on a switch to freeze the enemy, but the problem was it'll work on a global scale.

    So how do I make it like, if the event is in THAT range only then the switch goes on to freeze it? That's why I'm not sure how it's done.

    Also, what script would help me out? As long as it works, I guess yes I'll use it.
  4. You don't need a script. Whatever you're using to cast the spell should call a common event. In the common event do something like this (in a script call):

    Script: x = $game_player.x y = $game_player.y $game_map.events.each { |event| if event.x.between?(x-1,x+1) and event.y.between?(y-1,y+1) $game_self_switches[[@map_id, event.id, 'A']] = true end }I THINK id is a property on events. If it gives you an error, try changing it to event.event_id instead of event.id

    This will require that you use the same self switch, 'A', on each event that you want to freeze, then have a page conditioned by that self switch with the freeze graphic.

    There are probably better ways to unfreeze them after a set period of time, but all I can come up with at the moment is to then set those additional pages to parallel process, and have a Wait X seconds (however long you want them to freeze for), followed by Control Self Switches A = OFF.
  5. Nope, the script sadly crashes either way!

    Spoiler
    10590583_10202717627319147_6584715825581069712_n.jpg

    10368391_10202717632879286_343004416368427822_n.jpg

    Both of them gave me this:

    10593030_10202717627399149_1654077115328102506_n.jpg

    Since the errors were the same, did I somehow miss something? Here's what I did for the events with the self switch:

    10488041_10202717644999589_8308616444655504259_n.jpg

    10446657_10202717645039590_571433602018266001_n.jpg

    Was it my fault did I miss anything or something wasn't right in the script call?
    Sorry, I'm not really good when it comes to whatever related to scripts. But I am in the learning process, a very slow one! >_<
  6. ah, hashes!!!


    Change this $game_map.events.each to $game_map.events.each_value
  7. Shaz said:
    ah, hashes!!!

    Change this $game_map.events.each to $game_map.events.each_value
    You sir made my day! Worked just like a charm! Though, one thing to note. When you change the event.id to event.event_id, it will crash, so the original works but not the supposed to fix code. So thank you so much for helping out, I'll credit you for sure for this!

    Now with that done, my second question from the main post itself! 0_0; A projectile, thing... Any scripts ASIDE FROM THE HYPER COMPLICATED BATTLES STUFF? Just, something to change the character of the event when your projectile hits it, that's all!