Galv's Map Projectiles

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,192
Reaction score
1,168
First Language
English
Primarily Uses
N/A
I just did that for the demo. It's controlled using a parallel process. You need to use a parallel process to control your shooting and choose a different button.
 

Matt_Slykhuis

Warper
Member
Joined
Apr 22, 2013
Messages
3
Reaction score
0
First Language
English
Primarily Uses
I just did that for the demo. It's controlled using a parallel process. You need to use a parallel process to control your shooting and choose a different button.
Awesome. Thanks for the quick reply.

Sorry for the noob question, but I am trying to re-map this to the 's' button. I have placed this:

Input.isTriggered('s') && !$gameMap.isEventRunning()

in the script, but it doesn't work. Is there something I am missing? Thanks.
 
Last edited:

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,192
Reaction score
1,168
First Language
English
Primarily Uses
N/A
Unfortunately you can't use all keys by default, you'll need another plugin to let you do that
 

Ace of Spades

Veteran
Veteran
Joined
Jan 19, 2017
Messages
121
Reaction score
162
First Language
English
Primarily Uses
Hey Galv, just wanted to say thank you for the great work you've done with your plugins. I noticed a small bug with this plugin though:
I have an enemy event that shoots a projectile directly at the player. The problem is, the projectile changes directions if the player moves and enters the menu, and then exits the menu. Essentially, whenever the map scene is reloaded, the projectile will change directions as opposed to continue on a straight path toward its original target. Any help or fixes would be appreciated!
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,192
Reaction score
1,168
First Language
English
Primarily Uses
N/A
Thanks for the report. I'll look into it one day when I get time (very busy these days :( )
 

LeeAceSan

Veteran
Veteran
Joined
Jan 8, 2018
Messages
54
Reaction score
31
First Language
French
Primarily Uses
RMMV
Thank's Galv, this plugin is awesome, I try to create a battle system with it :D

Someone can help me please, I want to do that :

When the projectile from the player touch the "event 1 (enemy 1)" --> Life Point - 1

I think, I need to use this command : "Galv.PROJ.ceTargetId()"
But I don't know how to use it :blink:
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,676
Reaction score
2,146
First Language
English
Primarily Uses
RMMV
I did this using Yanfly's Self Variables plugin. Each enemy event gets a Self HP variable that's unique to it. When the event is first created, it runs an Auto-run and sets it's HP and then self-switches over to A where it can run an Event Touch trigger that damages the player or launches its own projectiles with a parallel trigger. It's also helpful to use Galv's Event Spawner so that each enemy only has to be created once and then spawned onto the map. That's the simplified version of how I made Eremiel.

As for how to decrease enemy HP, I set the projectile shot from the player change the self-switch to B which would be the auto-run page that subtracts 1 from the enemies Self HP and checks to see if it has fallen to 0. If so, switch to self-switch C to handle it's death, if not, go back to self-switch A. There are likely other ways to do it but this is what worked for me.
 

LeeAceSan

Veteran
Veteran
Joined
Jan 8, 2018
Messages
54
Reaction score
31
First Language
French
Primarily Uses
RMMV
Thanks again FrogBoy, I didn't know this plugin. I played Eremiel, That exactly what I want to do.

The problem is when I activate a Self Switch with Galv plugin here :

"Premade 1 : -1,0,8,6,'bulletBlast',1,'|c(1),S(1 : on)',[1],[],3,1,60"

It's doesn't work, but with classical switch, it's work.

You can download my test, I made two tab in the project : Battle Test "with Self Switch" and "without".
You can watch my goal (kill two monsters) and my problem.
But I feel shame to ask you that, you already helped me too much :(

The project file : https://drive.google.com/open?id=1pijjEHIifTUSI4CtOT9MxuML1dYvOJF6
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,676
Reaction score
2,146
First Language
English
Primarily Uses
RMMV
This plugin is super cool but it's very unforgiving of even small mistakes. If you're going to make a full blown game using it as you're base mechanic as I did, you will need to learn it well. Start with his example and change one little thing at a time and test thoroughly. I'd be lying if I said that it wasn't challenging to get Eremiel working and polished.

I'm not by my computer so I'm going from memory but you may have the case wrong. I think self Switches use a lowercase s and uppercase self switch letters so something like s(A:on) might be what you need. Pay close attention to the documentation and test after every change.
 

LeeAceSan

Veteran
Veteran
Joined
Jan 8, 2018
Messages
54
Reaction score
31
First Language
French
Primarily Uses
RMMV
In fact my problem was a misenderstanding of the Yanfly's plugin :guffaw:

Now it's working properly, so nice ! Yeah I read a dozen of times the documentations but sometimes it's hard for me to fully understand, because it's not my native tong :|

But with your answer you illuminated my brain :cutesmile: Thanks a lot dude, you are the best, and thanks for the tips. :):thumbsup-right:
 

mobiusclimber

Veteran
Veteran
Joined
May 3, 2018
Messages
265
Reaction score
150
First Language
english
Primarily Uses
RMMV
This plugin is exactly what I need for my game, so, Galv, thank you so much for making this!!! I do have a few probably totally n00b questions tho cuz I tried setting this up and just couldn't get it to work right...

To start with, I can't get enemies to die when hit. They don't have the tag that makes them impervious. Not really sure what I'm doing wrong. I did change the variable number in the plugin, but for the most part, I just copied all the code out of the demo while making small changes. For instance, I just used premade animations instead of making new ones (I will at some point, I just wanted to get things set up first). Is there another place where I need to change the variable number besides in the plugin itself? Or is it something else? Did I miss it and I need to set up a second page for if the switch is turned on, to turn off the event? Am I using the wrong code for the "custom move" in the event itself? Which leads me to my next question...

How do I set it up so that the enemies both shoot projectiles and move towards the player. I'm trying to set up a horizontal shmup and don't want all/most of the enemies to be stationary.

On a similar note, how do I make it so that the player can only shoot in one direction, straight ahead, regardless of which direction is pushed. (The player ship's sprite always looks ahead regardless of which direction it is pushed in. But moving in different directions DOES change the way the sprite looks, so I don't want to just freeze the ship so it can't turn in those directions.)

Sorry if these are all simple things that I just am too n00b to understand. I don't know Javascript (or any scripting language) so parts of this plugin are tough for me to really understand.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,676
Reaction score
2,146
First Language
English
Primarily Uses
RMMV
@mobiusclimber @LeeAceSan
I just posted the source project for my game Eremiel that uses the Map Projectiles as the core for an action battle system. Feel free to check it out and learn from it. I'm sure I didn't implement everything optimally (it was an IGMC game) but it should significantly cut down on the learning curve. I hope you find it useful. Source is on page 2.
 

mobiusclimber

Veteran
Veteran
Joined
May 3, 2018
Messages
265
Reaction score
150
First Language
english
Primarily Uses
RMMV
That's awesome! Thanks so much for the help, I'll check it out!
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,676
Reaction score
2,146
First Language
English
Primarily Uses
RMMV
No problem. I know what you're getting yourself into here and it's going to be challenging. I hope this helps and saves you a lot of swearing at your computer.
 

mobiusclimber

Veteran
Veteran
Joined
May 3, 2018
Messages
265
Reaction score
150
First Language
english
Primarily Uses
RMMV
Unfortunately, I'm even more confused now then I was before. XD I still can't tell what I'm doing wrong and what you're doing in your game is so much more advanced than my understanding... I'm just not getting it at all. I'm going to try what you were talking about and use Yanfly's Self Variable plugin and see if I can't get the enemy to die that way. But I really wish I knew why things weren't happening right with how I have it set up now. I've been over it and over it, tho, and I just don't see where the problem is at (beyond that I don't understand fully what everything is doing).
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,676
Reaction score
2,146
First Language
English
Primarily Uses
RMMV
This plugin definitely has a learning curve. Getting enemies to die after one hit should be pretty easy, though. I think |e in the action parameter is all you need to erase an event when hit. Still, it's going to take some time to learn it. This game is the final product of my experience so try not to let it overwhelm you.

How do you have your projectile set up?
 

mobiusclimber

Veteran
Veteran
Joined
May 3, 2018
Messages
265
Reaction score
150
First Language
english
Primarily Uses
RMMV
My three premades:

Code:
-1,0,8,6,'bulletBlast',1,'|c(202),e,S(1:on)',[1],[],3,1,60
0,-1,3,6,'bullet1',2,'c(203)',[],[],3,666
-1,'m',8,6,'bullet0(8,5)',1,'|c(202),e,S(1:on)',[1],null,null
My common events:

Code:
202:
◆Control Variables:#0182 Player Kills += 1
◆Control Variables:#0183 Event ID player hit = Galv.PROJ.ceTargetId()
◆Script:console.log($gameVariables.value(183));

203:
◆Control Variables:#0184 Hits += 1
◆Show Animation:Player, Fire One 1
◆If:Hits = 16
  ◆Show Animation:Player, Fire All 3
  ◆Wait:60 frames
  ◆Change Transparency:ON
  ◆Wait:120 frames
  ◆Game Over
  ◆
:End
My parallel event:

Code:
◆If:Script:Input.isTriggered('ok') && !$gameMap.isEventRunning()
  ◆Script:Galv.PROJ.quickDir(1);
  ◆Wait:1 frame
  ◆
:End
◆If:Script:TouchInput.isPressed()
  ◆Script:Galv.PROJ.quickTar(3);
  ◆Wait:10 frames
  ◆
:End
My enemy event:

Code:
Autonomous Movement: Custom: Route: 
Galv.PROJ.quickTar(2,this._eventId);
Name: EV001
Trigger: Action Button
Contents:
◆Comment:<projEffect>
I'm pretty sure I'm just doing something a little bit off, but I don't know what.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,676
Reaction score
2,146
First Language
English
Primarily Uses
RMMV
I'm not going to be able to investigate this right away so my suggestion for right now is what I said earlier. Copy the bare minimum of what you need over from the demo project first. Just get you're player running around a map and shooting. Then place an enemy on the map and projEffect it so that it disappears when hit. Then add each additional change one step at a time and test so you can get each feature working and not lose track which change broke it. It'll be difficult to find what's wrong with your setup without any indication of where it's broken. I've spent a good amount of time using this plugin so trust me when I say, it's really easy for even the smallest mistake to break it and it's usually not obvious where you went wrong.

One thing I noticed that you might want to check. Try adding the | in your second parameter list. The code probably needs that to split on to determine if it's the player action or the enemy action.

0,-1,3,6,'bullet1',2,'c(203)|',[],[],3,666
 
Last edited:

mobiusclimber

Veteran
Veteran
Joined
May 3, 2018
Messages
265
Reaction score
150
First Language
english
Primarily Uses
RMMV
Thank you for the suggestion! It actually turned out that yeah I needed that "|" in there. Dunno how I missed that...
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,676
Reaction score
2,146
First Language
English
Primarily Uses
RMMV
Oh, good! Do you have it working now?
 

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

Latest Threads

Latest Profile Posts

I made a battle results screen for my minigame.. any feedback? :)
Things I thought would never happen but just did: I needed to use my snow shovel. In August. In the Northern Hemisphere.
So I finished Cupcake, now I need to figure out my next project!
Do I pick up one of my incomplete games?
Do I start something entirely new???
The possibilities are endless!
Am I the only one who keeps thinking TPBS means "Turn Press Battle System" and not "Time Progress Battle System?"
How is everyone doing? I hope you do not get into trouble. Also how many people here updated their profile? I see icon changes a lot.

Forum statistics

Threads
100,677
Messages
978,331
Members
132,295
Latest member
Zomk5g
Top