Eventing Projectile and Freeze Skills

Hahn Deathspark

Deathspark
Veteran
Joined
Jan 5, 2013
Messages
842
Reaction score
109
First Language
English
Primarily Uses
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...
 



              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:



  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 :/
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
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.
 

Hahn Deathspark

Deathspark
Veteran
Joined
Jan 5, 2013
Messages
842
Reaction score
109
First Language
English
Primarily Uses
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Hahn Deathspark

Deathspark
Veteran
Joined
Jan 5, 2013
Messages
842
Reaction score
109
First Language
English
Primarily Uses
Nope, the script sadly crashes either way!





Both of them gave me this:



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





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! >_<
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
ah, hashes!!!


Change this $game_map.events.each to $game_map.events.each_value
 

Hahn Deathspark

Deathspark
Veteran
Joined
Jan 5, 2013
Messages
842
Reaction score
109
First Language
English
Primarily Uses
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!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top